- Home /
The question is answered, right answer was accepted
My physical object flickers when trying to rotate it
Hi all. I'm trying to rotate a physical object using MoveRotation on it's rigidbody. This object is actually my player, but that's an irrelevant distinction. The rigidbody is NOT kinematic. Rotation is set to be constrained on all axes, but from what i understand that shouldn't affect scripted rotation, (turning constraints off didn't change anything anyway)
The problem is, the object just constantly flickers back and forth between the intended rotation, and its original. As if it's changing and then getting set back immediately. I'm setting its rotation in FixedUpdate which would explain what i'm seeing if that were true.
However, i'm 99% sure that no other scripts are setting or influencing his rotation at all. is there a way to conclusively check that maybe?
I've also tried setting the rigidbody.rotation directly, and setting the transform.rotation of the gameobject the rigidbody is attached to.
And finally, just incase some terrain geometry was somehow blocking him, i've also tried dropping him from several thousand metres up and attempting to rotate in mid air. Same flickering issue.
Any idea what might be going on?
My entire input/control code is here: http://pastebin.com/WxdCzQ0B
Note that the debug message in the fixedUpdate function is outputting what i believe are sane and normal values:
please convert this to an answer so i can mark you as correct =)
Follow this Question
Related Questions
keep rigidbody z rotation zero 0 Answers
How to make a player rotate in a direction with a slope of the ground. 0 Answers
how to tilt boat on turning 2 Answers
Rotate Rigidbody to always face a force 0 Answers
Rotating a moving object 0 Answers