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

BodyVelocity Makes Parts Fly Crooked?

Asked by 10 years ago

I've been doing a lot with BodyVelocity and its siblings recently, but I've noticed that when used along with lookVector in a tool, it causes the part to fly a bit skew from the correct direction at first. This is most noticed when lookVector is multiplied by 400 or more, and is quite a problem for one of my games, which relies on accuracy heavily. I've seen examples of where it doesn't cause said problem, but I don't know what the difference might be from what I'm doing.

0
For example, when aiming in certain directions and with velocity tuned up to 700, the launched part will shift 5-8 blocks left of where it should be before correcting its course. deaththerapy 60 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

First you want to make sure the maxForce property of the BodyVelocity is set as math.huge,math.huge,math.huge. Also, you want to make sure the object that is being launched has the CanCollide property set as false, so that no other bricks can interfere with that part. This should hopefully work

0
Huh, math.huge might be my issue, I've seen it before but havn't know what it does. deaththerapy 60 — 10y
0
math.huge is infinity. So if you put the maxForce as math.huge, you're putting the maxForce as infinity TurboFusion 1821 — 10y
Ad

Answer this question