I don’t see how I could implement this system into my train.
I’d sughest putting Attachment0 of the AlignPosition on the train and Attachment1 on the starting part.
Then, when you want the train to move, change Attachment1’s parent to the finish part, so the attachment changes it’s location.
Alright, I’'ll see if I can make it work.
One question however, would it bring the player along with it when the train moves?
It should work the same as BodyPosition, so yes, it should.
If you increase dampening (BodyPosition.D), you can get rid of this effect, but it’ll slow down as it reaches its target. Alternatively, you could also use tweening if you don’t want to deal with body movers.
There’s also a risk that it won’t reach it’s target precisely and stop before it
This wouldn’t move players standing inside, which is one of OP’s requirements I assume.
Small problem, because the train isn’t anchored, it now falls to the ground, but I want it to stay floating like it is on the body position version.
Have you tried increasing the MaxForce?
Not by default but that can also be scripted, and has been done before as well:
So far, I’ve only added the actual attachments. I’m not too sure which values I need. Could you tell me?
Create an AlignPosition constraint. The Attachment0 property should point to the attachment on the train, while the Attachment1 should point to the attachment on the starting part.
MaxForce: Make it really high, but not too high because it will fling itself into void
MaxVelocity: Set it according to your preferences
Responsiveness: Same as above
Example setup:
(I also used an AlignOrientation to keep the Train part upright)
Yeah, so, that doesn’t work. The train just flies up.
Looks like you didn’t do anything to keep it in correct orientation. I wonder why the same didn’t happen with your BodyPosition example.
Try using an AlignOrientation constraint. Set attachments the same way as in AlignPosition and enable RigidityEnabled.
Works amazingly! However, when someone sits in a seat in the train, the train starts to jerk all over the place.
Can you record a video of that?
When you sit, the train temporarily rotates in the direction your character was going. This suggests that the mass of the train is lower than your character’s mass, which is not good.
Did you try this solution and leave it like that? Make sure all parts have the Massless property disabled.
Oh, I’d better disable massless then