Problems setting up Cinemachine Camera

I am currently on Lesson 42 of the Unity 3d course and for some reason setting up the tracking to follow the rocket object is not working as intended.

When I set the tracking to Position control to any of the options provided, the camera teleports to the back of the object but I want it to be in front of the object.

Is anyone able to help me out with this quirky behaviour.

Thank you

I am including an image of the editor for more clarification

Hi,

Welcome to our community! :slight_smile:

In your screenshot, I can see that the camera is behind the rocket, so it is no surprise that it renders the “wrong” side of the rocket.

Here are a few things you could check:

  1. Make sure that the “Tracking Target” field references the “Player Rocket” game object in your Hierarchy, not the prefab in your Assets folder.
  2. Make sure that your Movement component is attached to the “Player Rocket” game object, not to the child of “Player Rocket”.
  3. Make sure that the “Position” values in the Inspector of the “Rick’s Weird Space Pod” game object are set to a value close to (0, 0, 0). Since a child game object moves relative to its parent, and since the “Position” is relative to that parent, it represents the offset to the parent. Since the camera is looking at the parent, the offset of the child must not be too big.
  4. Use the CinemachineFollow component to adjust the position of the camera.

Did this help you solve the problem? :slight_smile:


See also:

Ha suggestion no 4 did the trick!

Surprisingly that was an easy fix, thank you very much

I’m glad the solution was so simple. :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.