Need AlignOrientation Help - How to set rotation from given Unit Vector?

Creating: I’m trying to create a object that rotates in the direction it is moving in.

Objective: At a given point I would like to set the rotation of a part from a given direction (Unit Vector).

Approach: AlignOrientation (why? I will not be changing velocity ofthen so I prefer not to update the CFrame/Orientation constantly using RunService, just at given times.)

Problem: I would like to set the AlignOrientation properties PrimaryAxis and SecondaryAxis from a given Unit Vector.

In other words, I am not sure how to get how to get the UpVector and RightVector from a given LookVector. I’m sure you can simply rotate 90 degres relative to the unit vector, but I do not know where to learn this kind of math.

I am open to other approaches to setting the rotation of the object. I am not using RunService to constantly update the CFrame directly because it needs to collide with other objects.

If someone can point me in the right direction to this kind of math, that would be awsome!

Is this too complex or am I just stupid? If only legacy BodyMoves stille existed T_T.

1 Like

Use Vector:Cross()

2 Likes