Riferimento API di nanos world Documentazione italiana non ufficiale
Documentazione ufficiale
Funzione Server Veloce

Cable:SetLinearLimits

Sets the Physics Linear Limits of this cable. If use_soft_constraint is enabled, then stiffness and damping will be used, otherwise restitution will be used.<br/><br/>Note: this method must be called before attaching any cable end.

Non ancora tradotto

Sintassi

Lua
my_cable:SetLinearLimits(x_motion, y_motion, z_motion, limit = 0, restitution = 0, use_soft_constraint = false, stiffness = 0, damping = 0)

Parametri

Nome Tipo Predefinito Descrizione
x_motion ConstraintMotion Indicates the linear constraint applied along the X-axis. Free implies no constraint at all. Locked implies no movement along X is allowed. Limited implies the distance in the joint along all active axes must be less than the Distance provided
y_motion ConstraintMotion Indicates the linear constraint applied along the Y-axis. Free implies no constraint at all. Locked implies no movement along Y is allowed. Limited implies the distance in the joint along all active axes must be less than the Distance provided
z_motion ConstraintMotion Indicates the linear constraint applied along theZX-axis. Free implies no constraint at all. Locked implies no movement along Z is allowed. Limited implies the distance in the joint along all active axes must be less than the Distance provided
limit facoltativo float 0 The distance allowed between between the two joint reference frames. Distance applies on all axes enabled (one axis means line, two axes implies circle, three axes implies sphere)
restitution facoltativo float 0 Controls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead
use_soft_constraint facoltativo boolean false Whether we want to use a soft constraint (spring)
stiffness facoltativo float 0 Stiffness of the soft constraint. Only used when Soft Constraint is on
damping facoltativo float 0 Damping of the soft constraint. Only used when Soft Constraint is on