2D Joint Component
- DistanceJoint2D: The anchors of two rigidbodies at both ends of the joint will keep a certain distance.
- FixedJoint2D: Hold two points on two objects together according to their initial angles of view.
- MouseJoint2D: When dragging a rigid body with the mouse, the rigid body will move with the mouse.
- RelativeJoint2D: Control the relative motion between two rigid bodies
- SliderJoint2D: The angle between two rigid body positions is fixed, and they can only slide in one specified axis.
- WheelJoint2D: Consist of Revolute and Prismatic joint, used to simulate motor vehicle wheels.
For information on using each Joint component, please refer to the Joints example case for details.
- connectedBody: the rigidbody connected on the other end of the joint.
- anchor: the anchor of the rigidbody on the same node of the joint.
- collideConnected: whether the rigidbody at both ends of the joint can collide with each other
Each joint need to link two rigidbodies to work. The one on the same node of the joint and the one on another node, which will be assigned to connectedBody property. Usually, each rigid body chooses a location around itself as an anchor point. Depending on the type of joint component, the anchor point determines the center of rotation of the object, or a coordinate point to hold a certain distance, etc.