Moving a model in direction

BEFORE YOU REPLY:

Yes I have seen some other threads similar to this but I’m not able to fix my problems, so I’m led to ask my own questions.


Now, I have a model that uses a BodyVelocity to move in the X axis (as shown in 1)

However, in 2, you can see if I use the X axis to move the model, it will not move in the correct direction.

How would I make the model move forward using the BodyVelocity and Vector3 as shown in 3?

Thanks!

Use a VectorForce instead. That way the force will always be relative to the object that the force is applied to.

1 Like

Would I use Vector.new(x,y,z) or something else? If so, how would I define X contrary to the direction of the model?

Alright, so in the world of CFrames we have a nifty command called CFrame.LookVector. This is basically a unit vector that tells us the direction in which something’s front face is looking.

You could make a script in which the BodyVelocity.Velocity == Jet.CFrame.LookVector

And, for creative purposes, if you wanted to make it move left or right you could add or subtract the base velocity based on player input.

2 Likes

Well, it makes a bit more sense to use -Z as forward, but let’s say you’re using +X as forward. In that case you would apply a “forwards force” by setting the VectorForce.Force to (forceAmount, 0, 0). Unless the forceAmount changes you won’t have to update the Force again even if the plane rotates, because VectorForce can be set to always apply the force relative to the body it’s applying it to.

1 Like

Got it working. Now how would I rotate the model on the X/Z axis?