I’m following the course ‘Complete C# Unity Game Developer 3D’, module 75 ‘Start Moving Our Player’ and I have hit a snag. The grouped ‘Player Rig’ with the camera and the player ship together, have the x axis forward and backwards on the map, the player ship doesn’t show a 0, 0, 0 for local position in the group, it shows a similar position to the camera and the group, so when I add a number to the x axis in the script, it flies forward away from the camera.
I know I have done something wrong, perhaps in the relationship of the group, I just can’t figure it out.
The image shows the coordinates of the player ship in the group, and the world orientation.
@Nina This was not tagged correctly but relates to the Unity 3D course, I appreciate the student may have moved on from this now but can you post a response to this please
Hi @PhoXx1972,
I’m sorry for the late reply. Something seems to have gone wrong with the tags, so I missed your question.
In case you still need help with this:
The Inspector always shows the local position relative to the respective parent. Without seeing the Hierarchy in the Unity Editor, I can only guess that there is a rather huge offset to the parent. Maybe the camera has got a similar offset to the parent.
If you already moved the spaceship via the Timeline animation, a common mistake is to animate the child(ren) of the PlayerRig (= the root game object) instead of the PlayerShip (= the child of PlayerRig).
Please let me know if that helped, or if you already solved the problem yourself, or if you still need help with this problem.
See also:
- Forum User Guides : How to mark a topic as solved
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.