Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I go about changing the BodyForce of an object to go in the direction of a CFrame?

Asked by 7 years ago

I'm making a plane and I already have the BodyGyro aspect working with CFrame (mouse.hit is where I'm getting the CFrame). I don't want a line of code just general guidance

0
If you mean the "forward" direction, that would just be the CFrame's lookVector. You can apply a force in that direction multiplied by the magnitude value you want the magnitude of the Force to be. Although BodyThrust will also work but in the part's space so you can just set the Z component to -magnitude. jakedies 315 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

I dont use BodyForce, but wouldn't just putting it at Vector3.new(0,0,-100) --or something like that enough? Im not sure but if it doesn't work like that just do CFrame.new(plane.Position,mouse.Hit.p).lookVector*100

Ad

Answer this question