Okay, so you know those ladders in (old) libraries on those rollers that you can move from left to right and climb on to get the book you need? I’m trying to create something like that, but I have no idea what constraints/physics items to use.
Does anyone have any idea how I should go about this? Really it seems simple, just a model that is pushable by the player that is constrained to one axis.
I have 2 of them in the library of my Steampunk place. It’s in the building with the stained glass window on the island with the big flat landing pad on the roof.
I used a PrismaticConstraint attached to the ladder model and an Anchored Part.
I put a transparent part on a lever at the bottom to be able to let it slide with a bit of friction to keep it from flinging when you hit it.
If you want it anchored and dragable use a DragDetector. They are pretty simple and the ladder will stay where you drag it.
Okay one question; when I tried recreating it, your solution seems to be the only way, but I can’t quite get it to work. Would you be able to share a little more detailed steps on how you did yours? (Whenever I try, I end up pushing on it but it just jitters, it doesn’t actually glide across.)
Make sure there are no other colliding parts. A great tool for working with Constraints is the ‘Are Contacts shown’ tool in the studio Physics settings.
Also, whenever you test something that has physics involved wait a few seconds. I find that physics seems to be one of the last things loaded in when you test. If you try moving it immediately when spawning in it’ll be stuck.
Is your PrismaticConstraint ActuatorType set to None? That allows it to move freely. Servo or Motor will make it stick if the forces are more than 0.
That makes much more sense, but I have one last issue. When you mentioned you added friction, how did you do that? Currently, when I push it, it continues moving (I’m assuming because of the force applied), so how could I minimize that continuous movement after pushing it?
Add a Hingeconstraint in one of the Parts of the ladder. Move the Attachment to one side and make sure the axis is parallel to the floor.
Add another unwelded unanchored Ball Part (1.x1x1) at the bottom of the ladder where it will drag on the floor. Make sure the Ball can’t touch any of the ladder parts, just the floorPut the other hinge Attachment in it, but make that Attachment offset to the same Position of the HingeConstraint Attachment to create a lever type effect.
If you move the Attachments so they are about the height of the center of the Ball from the floor then it should stay pretty stable. You could add Limits to the Hinge to keep it from flipping around if something weird happens.
Change the Friction or the Density of the Ball to control the amount of movement when you push it.