How do I make a child object move along with the parent object, but don’t let rotate?
I ask this question specificly for the Cube / Mobile skybox. When the cube is a child of the camera, it obviously moves along with it, but it shouldn’t rotate…
Do as per your comment, but after you move the camera (eg. in LateUpdate) to prevent jerking:
function LateUpdate()
{
transform.position = Camera.main.position;
}
Of course, if for some reason you are changing the camera position in LateUpdate (scripts often do this in order so that the camera tracks the latest position of, say, the player), then you’ll need to modify call order. IIRC, OnPreCull is called after LateUpdate, so you could use that too.
Alternatively, just do the work in your camera positioning script: