Why do my parent and children move at different rates?
This is for 2D, though I don't think that is relevent here.
I have an object "Player" and a child object "Player Sprite". Each has scale set to (1,1,1). Player has a rigidbody2D. I have replicated this problem with all scripts on the objects turned off, and with a dummy object as a child.
Whenever Player is moved more than 2 units from origin, Player Sprite (the object itself, not just the image) still has a local position of (0,0,0), but is further in the given direction than Player. As the distance from origin increases, so does the discrepancy.
This is happening both with my physics-based movement in-game and simply using the editor to change Player's position. It's just weird. Does anybody have any ideas?
EDIT: The effect of in-game physics appears framerate dependent, or is at least intermittent. The porblem in the editor is constant.
Answer by nintendoeats · Mar 23, 2016 at 07:42 PM
Agh, I got it. I had the editor handles set to Center rather than Pivot. I'm still not clear on why this was happening, but at least it works correctly now.
Your answer
Follow this Question
Related Questions
Object stops lerping when target is far away 0 Answers
Following object (arrow) slides off of a object 1 Answer
How do I check if a child object exists? 5 Answers
Can't Instantiate an object as child of another 1 Answer
reset a GameObject parents childs to 0 if a item has changed its parent 2 Answers