Using BodyMovers Without Having Motion Altered By Other Physics

I am not sure this is possible, but I would like to set a train in motion using a BodyVelocity, but I don’t want that velocity altered by players colliding with the train. So I want to use the BodyVelocity to move the train (since BodyMovers create great smooth motion), but I don’t want other players or objects to alter the BodyVelocity. I do want collisions enabled, since players should not be able to walk through the train.

1 Like

Using BodyVelocity causes the object and any welded objects to not be altered by physics other than the bodyvelocity.

There’s no official support for this feature. Here is a feature request for it.

The best you can do is:

  • High (math.huge or inf) MaxForce on the BodyVelocity
  • If the train is controlled by a player, locally put all other characters into a collision group that does not collide with the train. This will prevent the train from interacting with other players, but since players control their own physics the other players will still be able to stand and interact with the train.
  • I don’t think you can do anything if the train is server-controlled. You can try putting characters and the train into non-colliding collision groups on the server then putting the local character into a colliding collision group on the client.

This is not true. The object can still be stopped or slowed down by heavy objects or characters. High MaxForce helps but not in all cases.

3 Likes

I think your best bet would be to ask to be put onto this test

Oh, I forgot that I normally always put MaxForce to infinite on bosyvelocities, that’s probably why.

A temporary fix would be to disable the PGS solver, but I’ve heard it’s going to be fixed soon.