LinearVelocity goes off track

Reproduction Steps

Create a part and an attachment with a LinearVelocity force. Set the VectorVelocity property to a vector that doesn’t follow the main axis or the 45°, example: (3, 0, 9), (4, 0, 7). Toggle on and off the Enabled property and notice the inaccurate acceleration motion.

This seems to also be happening to the new Humanoid Physics Controller:

Reproduction file:
LinearVelocityBug.rbxl (29.8 KB)
In the Workspace, toggle the LinearVelocity in the part.
image
You should see the trail going off track.

Expected Behavior

The acceleration should be on track with the given VectorVelocity, no matter the MaxForce property.



Actual Behavior

The result is off track every time the acceleration starts.



Workaround

As of this moment, the only work around would be to switch all the LinearVelocity instances to VectorForces, however this is not viable in our time budget.

Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Constantly
Date First Experienced: 2022-10-06 00:10:00 (-04:00)
Date Last Experienced: 2022-10-06 00:10:00 (-04:00)

6 Likes

I didn’t even know that LinearVelocity existed until reading this post - I just used a BodyVelocity to accomplish the same thing. So if they’re not working, that could be a good alternative for now!

1 Like

This isn’t necessarily true. In your case, your part is also fighting against friction, which can be enough to throw a LinearVelocity off track if it has a low enough MaxForce.
In your place file, I changed MaxForce from 500 to 5000, and it no longer went off track.

Additionally, you have the Velocity applied in the attachment’s space. So, if the part rotates at all, it will move in a different direction.

3 Likes

Thank you for the quick response kleptonaut!

I understand this is a viable solution in this reproduction file, however this isn’t viable in my current situation. Increasing MaxForce has other consequences, such as making my object fling when colliding with other objects in the environment. More MaxForce definitely resolves this issue, but the point of MaxForce is not to fix irregular force application.

I originally discovered this issue with a floating sphere that didn’t have any ground friction (or any other surface friction whatsoever). I took the time to make another reproduction file to make the situation a bit more accurate. The part floats steadily with a VectorForce, the LinearVelocity is now applied to World, there’s also a Rigid AlignOrientation.

LinearVelocityBug V2.rbxl (39.1 KB)

Please point out if I’m doing anything wrong, I’d love for this to be my own mistake.

I’m surprised I forgot the existence of the body movers. I’ve just tried them and it seems they’re probably using the same back-end as LinearVelocity now because the issue is exactly the same.

3 Likes

Ah ok interesting, the issue is much clearer with this new repro, thank you!
Something definitely seems off here, we’ll look into it.

2 Likes

We have a fix for this! Should release in a couple weeks or so

4 Likes

I’m wondering if you can summarize what happened. Just very curious.

1 Like

Just confirmed with the engineers, this is fixed!

1 Like