Hello, thanks in advance for your help 
My game have a Cinemachine Virtual Camera with an Impulse Listener attached, which is working great for the screenshakes, but it also have some 3D objects, children to that camera, used as 3D UI objects.
Those 3D objets children to the virtual camera are rendered by an Overlay Camera, similarly to the technique used in FPS to render the weapon for instance. It is working nicely.
Problem is : they are affected by the impulse, but as they are used as UI objects, they should not! And as they are really close to the camera, they are shaking way more than the rest of the scene, so it is extremely noticeable!
Do you have any idea how to make them not affected by the impulse while still being positioned in front of the camera, like a Camera screen space Canvas would be (but they’re 3D objects) ?
The easiest way I’ve found for stability near the camera is to make your 3D UI objects children of the camera transform. If this doesn’t work with cinemachine for some reason (I have no experience with it), another approach is to make sure you’re positioning elements after the other scripts are done …so maybe could try moving related code to LateUpdate or customizing your execution order.
1 Like
Hey thanks for the reply, I found the solution!
Making the objects children of the Main Camera (with the Cinemachine Brain component) is giving the intended result. They no longer shake with the impulse.
When they were children of the Virtual Camera, which might actually not be moved by the impulse, they were shaking.
The reason why I made them children of the VCam instead of the Main Cam is because the game have several VCam that are activated or disabled depending of the state of the game, so disabling the corresponding children made sense. But a quick script will do.
1 Like
Okay - yeah I don’t know anything about Virtual Camera etc. just meant like my3dUI.transform.SetParent(Camera.main.transform), but with cameras working differently I have no idea
but maybe Camera.main transform position is still accurate so if u could reposition something relative to that after other stuff is done moving camera… might work. Just what comes to mind, hopefully someone else has got a solution for u if not - good luck !
Edit: good to hear it’s working now 
1 Like