I am developing a 2D game.
I used to move and rotate my GameObject along a Bezier curve by altering transform
properties until I did a little research and found out that using RigidBody2D
methods is a lot better way to go with and offers more performance.
However, now I have a problem. I used to set transform.up
to the first derivative of Bezier to rotate the object so that it always follows the curve by the right angle.
I can’t find a way to properly rotate my GameObject. How can I achieve the same effect without modifying transform.up
? What is equivalent to transform.up
when using RigidBody2D
?
Thank you!