Using a pivot point for rotating objects

1

Stats

5,184 visits, 8,109 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

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!