I’ve been using the RotateAround function to rotate some rigidbodies in my scene, works very well. However, I was doing some refactoring and noticed that suddenly RotateAround wasn’t doing accurate rotations! For example, I’d tell it to rotate by 90 degrees, and it might rotate 45 degrees or 130 degrees - it seemed random. I also noticed that modifying transform.rotation didn’t seem to give correct values.
Well, it turned out that doing these rotation operations on a game object that has a kinematic rigidbody attached was causing the problem. If I didn’t have the rigidbody, or if I set the rigidbody to be non-kinematic, everything worked fine.
Is there a reason for the rotation functions to not work as expected when isKinematic equals true, or is this a bug???
I use kinematic rigidbodies all the time. You are supposed to use transform to work with them when isKinematic is on. Are you working in local or world space? If you are in world space and the object is rotated, I could see that looking wrong in the inspector which only shows the local rotations. Can you provide some more information about the hierarchy and the code you are using?
Yes, they move the RigidBody, but when isKinematic is checked it means you are supposed to move the transform, not the RigidBody. This is because physics won’t have an effect on this object, only those which it collides with (unless I have this backwards of course, lol)