Context:
I am trying to use a prismatic constraint to move a wall with a hole in it so that the player can jump though. I am using a prismatic constraint because the player has a force on their body and if I used something like a linear force the wall would get pushed back or slowed down.
Help:
I’ve been trying to understand how to use it, but the creation docs don’t tell me enough. The main things I want to figure out is how do I choose which part is going to move, and do you even need to use two parts to make one of them move.
If you have more information other than the above I would be happy to learn it, Thanks!
PrismaticConstraints work like this, (Im not the best at explaining), think of it as a cable car line, except that it is straight. The line connects 2 points. That is the wall and another part which is anchored somewhere else, securing the line. The wall will only slide on 1 axis on that line and It wont rotate.
A prismaticConstraint does not move the wall, It only makes sure that the wall is able to slide on 1 axis and make sure it cant rotate. If you do not want the player to be able to slow down the wall, I advise using a bodyVelocity and then setting the BodyVelocities MaxForce to math.huge.
Even though you solved my question, I have to ask, do you think that the fact that my player moves forward using CFrames could be the reason the wall is getting pushed back? Because I was thinking maybe because its not using forces, then the wall can’t register that its force is being countered.
Your wall needs to have a higher mass (im guessing its thin) in order that it doesn’t get pushed back… so increase that through the Custom Physical Properties. Then you will also need to adjust your constraint forces, unless those are at max already
What kind of forces are you using to move the Player? If the forces are very high then try lowering them just enough to have the player move properly, but not high enough to push other objects around easily.
@Chimmy_Coder “A prismaticConstraint does not move the wall” isn’t a true statement. PrismaticConstraints can move along their length when the ActuatorType is set to Motor or Servo.
Both of you should take a look at the PlatformModel link I included before to see what I mean.