Can you shake the video player?

Hi guys,

I’m making a game where I use animated backgrounds in the back. To make things efficient, I use a video player with setting camera far plane. However, when I shake the camera, the video stays still. In fact, it doesnt move regardless of what the values of the gameobject’s transform is.

Is there any way you can shake the video player itself along with the camera ?
Thanks in advance.

If you watch in editor when the video plays, does it create a plane object which the video is rendered on? My guess is you need to shake that plane. I haven’t used far plane before, but my guess is it creates something.

If you can’t figure it out how to connect, then you can just make your own background plane and have that be the target, which should allow you to set up a reference to where the video renders.

The camera back back is always in the same place relative to the camera, by definition. No matter where you move the camera, the back plane moves with it, period. So you’ll have to change renderMode to another technique. I’d say you probably want RenderTexture and then apply that to a plane, which you in your own code will now have to place at the camera’s backplane, and that code you can modify to add whatever shaking/etc you want.

1 Like

could be possible to edit that video player shader,
to add shake there (if have to use that camera farplane mode)

can download builtin shaders from (downloads dropdown)

It unfortunately doesn’t create anything, but a good suggestion nonetheless. I knew I needed to move it somehow, but couldn’t connect the dots.

I’ve tried it and it works even without doing anything to my camera shake script. It does make it look a bit weird also, I guess I need to work out how to make it look exactly the same as I did in the other settings. Thanks!

Good suggestion, although I haven’t really played around that much with shaders, just edited couple of those I downloaded from the internet, but it would certainly be a great solution. Thanks!