Using a pivot point for rotating objects

Stats

3,347 visits, 5,549 views

Translations

This tutorial hasn't been translated.

Tools

When an object is on a pivot and you wish to rotate it, it becomes a little harder because you can't simply rotate from it's centre. You need to rotate from it's pivot point.

Take the following situation:

Situation

Explanations

1) Before rotating the object, calculate the joint position.

2) Rotate the object.

3) Calculate the new position of the joint.

4) Compute the delta and add it to the object position.

Code

Enjoy !

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!