R3d.BallAndSocketJoint

From GiderosMobile
Revision as of 08:12, 23 January 2020 by MoKaLux (talk | contribs) (Created page with "'''Available since:''' Gideros 2019.10<br/> '''Class:''' R3d.Joint<br/> === Description === The BallAndSocketJoint class describes a ball and socket joint between two bod...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2019.10
Class: R3d.Joint

Description

The BallAndSocketJoint class describes a ball and socket joint between two bodies.

In a ball and socket joint, the two bodies cannot translate with respect to each other. However, they can rotate freely around a common anchor point. This joint has three degrees of freedom and can be used to simulate a chain of bodies for instance.

In order to create a ball and socket joint, you first need to create an instance of the BallAndSocketJointInfo class with the necessary information. You need to provide the pointers to the two rigid bodies and also the coordinates of the anchor point (in world-space). At the joint creation, the world-space anchor point will be converted into the local-space of the two rigid bodies and then, the joint will make sure that the two local-space anchor points match in world-space. Therefore, the two bodies need to be in a correct position at the joint creation.

r3d.BallAndSocketJoint

Parameters

Example