1
\$\begingroup\$

I try to add angular velocity to my GameObject with this command:

rigidbody2D.angularVelocity = Random.value * tumble;

All works, but I want center of velocity be in the center of my rigidbody, but center is outside my GameObject and looks like every time in different place. How can I set rotation center to the center of my rigidbody?

IMPORTANT: when my GameObject is stay on place (no movement) then all works fine, when I add linear movement it begin rotate around some outside center.

Thanks!

\$\endgroup\$
  • \$\begingroup\$ This seems likely a Transformation matrix multiplication order issue. If you apply the rotation first, then the translation, then the rotation should stay relative to the object's origin. \$\endgroup\$ – Anko Jul 8 '14 at 14:49

Browse other questions tagged or ask your own question.