Scripting API
Scripting API
HingeJoint3D
Struct in Abyss.Physics3D, from Abyss.Physics3D.
Two bodies held turning about one line, as a door on its hinges or a wheel on its axle: the body this is on and HingeJoint3D.ConnectedBody, or the world where that is none. Its motor turns it, to a speed or to an angle; its limits stop it turning past two angles.
public struct HingeJoint3DRemarks
The line is through HingeJoint3D.Anchor, along HingeJoint3D.Axis in its entity's own units, and turns with it. Its angle is this body's turn about it from the connected one's, from the angle they were at as it was made, anticlockwise looking down the axis: HingeJoint3D.LowerAngle no more than nothing, HingeJoint3D.UpperAngle no less, each within a half turn.
Anchors and breaking as FixedJoint3D's.
Fields
ConnectedBody
public EntityRef ConnectedBodyThe other body: an entity with a Rigidbody 3D, or under one; none for the world.
EnableCollision
public bool EnableCollisionWhether the two bodies still meet each other.
AutoConfigureConnectedAnchor
public bool AutoConfigureConnectedAnchorWhether the connected anchor is made where the anchor is as the joint is made.
Anchor
public Vector3 AnchorWhere it holds this body, in its entity's own units.
ConnectedAnchor
public Vector3 ConnectedAnchorWhere it holds the other, in its entity's own units, or in the world's where there is none.
Axis
public Vector3 AxisWhat it turns about, in its entity's own units: up, for a door.
Motor
public JointMotor3D MotorWhat the motor does: nothing, drive it at a speed, or to an angle.
MotorSpeed
public float MotorSpeedHow fast the motor turns it, in degrees a second, anticlockwise looking down the axis.
TargetAngle
public float TargetAngleThe angle the motor turns it to, in degrees from where it was made, within its limits.
MotorFrequency
public float MotorFrequencyHow stiffly the motor holds it at its target, in times a second it would bounce there.
MotorDampingRatio
public float MotorDampingRatioHow the motor's spring is slowed at its target: 0 not at all, 1 at once.
MaxMotorTorque
public float MaxMotorTorqueThe most torque the motor turns it with, in newton meters.
UseLimits
public bool UseLimitsWhether it stops turning at HingeJoint3D.LowerAngle and HingeJoint3D.UpperAngle.
LowerAngle
public float LowerAngleThe least it turns, in degrees from where it was made: from a half turn back to nothing.
UpperAngle
public float UpperAngleThe most it turns, in degrees from where it was made: from nothing to a half turn.
BreakForce
public float BreakForceThe force it breaks at, in newtons; infinity never.
BreakTorque
public float BreakTorqueThe torque it breaks at, in newton meters; infinity never.
