Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Slider Joint 2D

Discussion in '2D' started by kernel_mode, Nov 20, 2013.

  1. kernel_mode

    kernel_mode

    Joined:
    Nov 19, 2013
    Posts:
    3
    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?
     
    Last edited: Nov 20, 2013
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,321
    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.
     
    Deleted User likes this.