Scripting API

Scripting API

SliderJoint3D

Struct in Abyss.Physics3D, from Abyss.Physics3D.

Two bodies held sliding along one line, as a drawer or a lift, kept at the turn they were made at: the body this is on and SliderJoint3D.ConnectedBody, or the world where that is none. Its motor drives it along, to a speed or to a place; its limits stop it past two places.

public struct SliderJoint3D

Remarks

The line is through SliderJoint3D.Anchor, along SliderJoint3D.Axis in its entity's own units. Its translation is how far this body has slid along it from where it was made: SliderJoint3D.LowerTranslation no more than nothing, SliderJoint3D.UpperTranslation no less. Anchors and breaking as FixedJoint3D's.

Fields

ConnectedBody

public EntityRef ConnectedBody

The other body: an entity with a Rigidbody 3D, or under one; none for the world.

EnableCollision

public bool EnableCollision

Whether the two bodies still meet each other.

AutoConfigureConnectedAnchor

public bool AutoConfigureConnectedAnchor

Whether the connected anchor is made where the anchor is as the joint is made.

Anchor

public Vector3 Anchor

Where it holds this body, in its entity's own units.

ConnectedAnchor

public Vector3 ConnectedAnchor

Where it holds the other, in its entity's own units, or in the world's where there is none.

Axis

public Vector3 Axis

Which way it slides, in its entity's own units.

Motor

public JointMotor3D Motor

What the motor does: nothing, drive it at a speed, or to a place.

MotorSpeed

public float MotorSpeed

How fast the motor drives it along its axis, in meters a second.

TargetPosition

public float TargetPosition

Where the motor drives it to, in meters along its axis from where it was made, within its limits.

MotorFrequency

public float MotorFrequency

How stiffly the motor holds it at its target, in times a second it would bounce there.

MotorDampingRatio

public float MotorDampingRatio

How the motor's spring is slowed at its target: 0 not at all, 1 at once.

MaxMotorForce

public float MaxMotorForce

The most force the motor drives it with, in newtons.

UseLimits

public bool UseLimits

Whether it stops at SliderJoint3D.LowerTranslation and SliderJoint3D.UpperTranslation.

LowerTranslation

public float LowerTranslation

The least it slides, in meters from where it was made: nothing or less.

UpperTranslation

public float UpperTranslation

The most it slides, in meters from where it was made: nothing or more.

BreakForce

public float BreakForce

The force it breaks at, in newtons; infinity never.

BreakTorque

public float BreakTorque

The torque it breaks at, in newton meters; infinity never.