- Home /
Rotating a parent-child pair
Hello,
I have two players in my game: playerA controlled by keyboard and playerB controlled by the mouse. PlayerA becomes the parent of a GameObject, rotates (the game object rotates as well, of course) and stops moving. After the movement has stopped the Console shows me that the x and z position of the game object keeps on changing (it starts with the last two decimals of the number). This does not happen when the same process is done by playerB (controlled by mouse). The physics' characteristics of the two players are the same.
Could anyone explain to me why this is happening?
Thanks in advance.
Answer by StephanK · Apr 01, 2011 at 10:47 AM
Probably you are using GetAxis which won't switch the value to 0 as soon as you release the key but rather will smoothly fall back to 0 depending on the parameters you specified for this input.
Answer by charline 1 · Apr 11, 2011 at 08:18 AM
Yes, that was the problem, thank you both very much :-)
Your answer
![](https://koobas.hobune.stream/wayback/20220613120129im_/https://answers.unity.com/themes/thub/images/avi.jpg)