How do I get AlignPosition to behave like BodyPosition?

Since the advent of constraints, AlignPosition has replaced BodyPosition. That being said though, AlignPosition isn’t doing what BodyPosition did and I’m at a loss for how I can achieve that. I want to move my model via physics and the new constraints, but I can’t figure it out well.

This is my model with AlignPosition and RigidityEnabled:

This is my model with BodyPosition with math.huge force on all axis:

As you can see from these videos, they both behave fairly differently. Although they both do the job of reaching their intended points through physics, AlignPosition doesn’t hold the object in air and instead drops it to the ground if the goal is too far before snapping it in place (RigidityEnabled). Now for BodyPosition, the model is always held in the place it should be and never falls. It then reaches its position as expected in a tween-like manner.

How can I get an AlignPosition to behave the same way as BodyPosition? I was under the impression that an AlignPosition would do exactly as its name states, but it’s not been doing its job well as shown here. I need my model to stay in the air and never fall, and for it to move to its goal.

I’ve tried other things such as replicating, to the best of my ability, the properties of the BodyPosition to the AlignPosition (math.huge force), just results in the model getting instantly deleted (force is too huge that gravity probably pulls it down to the fallen parts destruction height).

7 Likes

Figured it out. The trick is to lessen the MaxVelocity and increase the MaxForce. This will keep the part in air and slow down the approach rate. You can’t, unlike BodyPosition though, make the numbers math.huge, otherwise the same disappearing/overbearing force issue will occur.

I had both MaxVelocity and MaxForce as infinite when the disappearing behaviour occurred: same happens when MaxForce is infinite and MaxVelocity is even a small number like 10.

This is my result with a MaxForce of 500K and a MaxVelocity of 10:

33 Likes