Slider Joint 2D

Hello.
I am playing with new Unity 2d tools and trying to make simple pong game. I restricted player’s movement to y axis by adding Slider Joint 2D component to an object. When I try to use “Connected Rigidbody” property joint stops working: when a ball hits an object it moves along x axis. What this property is supposed to do? Am I forced to input constant values to position slider joint line?

The connected rigid-body is the rigid-body the other “end” of the joint is connected to. If you don’t specify one then it’s implicitly connected to the ground-body which is a hidden body at the world origin. If you do then the connected anchor points are relative to that body and not the ground-body.

Hope this helps.

1 Like