Class UniversalJoint
- Namespace
- Jitter2.Dynamics.Constraints
- Assembly
- Jitter2.dll
Creates a universal joint utilizing a TwistAngle, BallSocket, and an optional AngularMotor constraint.
public class UniversalJoint : Joint, IDebugDrawable
- Inheritance
-
UniversalJoint
- Implements
- Inherited Members
Constructors
UniversalJoint(World, RigidBody, RigidBody, JVector, JVector, JVector, bool)
Initializes a new universal joint.
public UniversalJoint(World world, RigidBody body1, RigidBody body2, JVector center, JVector rotateAxis1, JVector rotateAxis2, bool hasMotor = false)
Parameters
worldWorldbody1RigidBodybody2RigidBodycenterJVectorrotateAxis1JVectorrotateAxis2JVectorhasMotorbool
Exceptions
- ArgumentException
Thrown when
centercontains a non-finite value, when either rotation axis is zero or contains a non-finite value, when either body does not belong toworld, or when both body references are the same.
Properties
BallSocket
public BallSocket BallSocket { get; }
Property Value
Body1
public RigidBody Body1 { get; }
Property Value
Body2
public RigidBody Body2 { get; }
Property Value
Motor
public AngularMotor? Motor { get; }
Property Value
TwistAngle
public TwistAngle TwistAngle { get; }