Physics Based Elevators Sleeping Parts Issue

I’ve been working on physics based elevators that work using prismatic constraints, and they are now at the stage where they are entirely reliable except for one case, where after updating the target position on the prismatic constraint, the connected parts don’t actually start moving until they have been knocked into etc. I presume this is due to the sleeping part physics system, and for some reason updating the properties of a constraint does not wake up parts connected to that constraint. Unfortunately for me it’s one of the bugs that when you try to replicate on video is ceases to occur.
https://i.gyazo.com/dc9715f5de0cc48bce322f9e494c29c5.mp4
As soon as the doors closed, the target position on the constraint is updated, as you can (just about see) from this video, up until I jump, which I presume is causing the elevator to wake up, the elevator doesn’t move.
This isn’t much of a problem if you are in the elevator, but if you are on a different floor and have called it to you, this occasionally happens too, and you can’t knock into the elevator when you are five or more floors away from it.
One idea I was experimenting with was anchoring the lift when it reaches a floor, and unanchoring it right after I update the constraint, presumably this would wake the part up, however the same bug was occasionally happening with the doors (where as they need knocking into to update them) and I can’t anchor them when they are closed as this would prevent the elevator from moving.
(worth noting the doors use constraints also rather than tweening their weld cframe or the like so they can do this easily) https://i.gyazo.com/254ff3205c1ae77efb4b829cba5e71aa.mp4

Based on enabling the show sleeping parts setting on studio, this supports my theory that this mechanic is the cause, does anyone have any suggestions on potential solutions?

Thanks

1 Like