Carwheel : Helper

Carwheel - superclass: Helper; super-superclass:Node - classID: #(1127090218, 619653028)

Description:

You can use this constraint to attach a wheel to another object - for instance, a car chassis. You can also constrain a wheel to a position in world space. During the simulation, the wheel object is free to rotate around a spin axis defined in each object's space. Linear motion is allowed for the wheel along a suspension axis. You can also add limits to the wheel's movement along this axis. The constraint's child body will always act as the wheel, while the parent will act as the chassis.

Carwheel constraints also have spin parameters. If these are nonzero, the constraint will turn the wheel during the simulation. You can specify a target velocity and a target gain - this is the maximum angular impulse that the motor can apply to the rigid body in order to achieve the target velocity.

Constructors:

Carwheel ...

rctCarwheel ...

Properties:

.parentBody (Parent_Body) : node

Get/Set the Parent Body.

.hasParent (Has_Parent) : boolean

When set to true, the Parent Body will be used in the simulation.

.childBody (Child_Body) : node

Get/Set the Child Body.

.limitsMin (Min_Suspension_Limit) : float

.limitsMax (Max_Suspension_Limit) : float

Get/Set the suspension limits.

.suspensionFriction (Suspension_Friction) : float

Get/Set the suspension friction.

.velocity (Spin_Velocity) : float

Get/Set the wheel's velocity.

.gain (Gain_for_Spin_Velocity) : float

Get/Set the maximum angular impulse that the motor can apply to the rigid body in order to achieve the target velocity

.iconSize (Icon_Size) : float

Get/Set the icon size.

.isBreakable (Is_Breakable) : boolean

When set to true, the constraint will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength (Linear_Strength) : float

The linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength (Angular_Strength) : float

The angular breaking limit value used to when .isBreakable is set to true.

.strength : float

.tau : float

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.lockSpaces (Lock_Spaces) : boolean

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

Interfaces

Interface: rctCarwheelInterface

Properties:

.parentBody : node : Read|Write

Get/Set the Parent Body.

.childBody : node : Read|Write

Get/Set the Child Body.

.hasParent : boolean : Read|Write

When set to true, the Parent Body will be used in the simulation.

.parentTransform : matrix3 by value : Read|Write

Get/Set the Parent Body's transformation matrix.

.childTransform : matrix3 by value : Read|Write

Get/Set the Child Body's transformation matrix.

.lockSpaces : boolean : Read|Write

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice-versa.

.strength : float : Read|Write

.tau : float : Read|Write

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.isBreakable : boolean : Read|Write

When set to true, the constraint will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength : float : Read|Write

The linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength : float : Read|Write

The angular breaking limit value used to when .isBreakable is set to true.

.displaySize : float : Read|Write

Get/Set the icon size.

.suspensionTransform : matrix3 by value : Read|Write

Get/Set the transformation matrix of the suspension node.

.suspensionLimitMin : float : Read|Write

.suspensionLimitMax : float : Read|Write

Get/Set the suspension limits.

.suspensionFriction : float : Read|Write

Get/Set the suspension friction.

.velocity : float : Read|Write

Get/Set the wheel's velocity.

.gain : float : Read|Write

Get/Set the maximum angular impulse that the motor can apply to the rigid body in order to achieve the target velocity

Methods:

<void>alignToParentBody()

Aligns the Constraint to the Parent Body.

<void>alignToChildBody()

Aligns the Constraint to the Child Body.

<void>alignToParentSpace()

Aligns the Constraint to parent space.

<void>alignToChildSpace()

Aligns the Constraint to child space.

<void>alignToEachBody()

Aligns the Constraint to both bodies.

<boolean>isValid()

Returns true if the Carwheel Constraint is valid, false otherwise. A valid Carwheel Constraint has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor