Vehicle Actors
Vehicle physics actors with wheel simulation. Create with CreateVehicleActor().
- Function AddVehicleWheel(actor, wheel_actor, is_front_wheel)
Add a wheel to a vehicle actor
is_front_wheel sets whether it should be considered a front wheel for physics and control
NOTE: Once an actor is set as a wheel, the vehicle controls all transforms for the actor
See also
- Function GetVehicleAxis(actor, ByRef x, ByRef y, ByRef z)
Gets the axis used to define a vehicles orientation.
Direction
Axis
Meaning
X
Right Axis
Wheel axle direction
Y
Up Axis
Suspension direction
Z
Forward Axis
Driving direction
- Sub GetVehicleForwardVector(actor, ByRef x, ByRef y, ByRef z)
Gets the forward vector of a vehicle.
- Function GetVehicleCurrentSpeed(actor)
Returns the current speed set on the vehicle.
- Function GetWheelCount(actor)
Returns the number of wheels on a vehicle.
See also
- Sub GetVehicleChassisWorldTransform(actor, t_matrix)
Stores the world transform of the chassis actor in a vehicle.
- Function GetWheelSteeringValue(actor, wheel)
Returns the steering value for a wheel.
See also
- Sub GetWheelWorldTransform(actor, wheel, t_matrix)
Returns the world transform of a wheel on a vehicle.
NOTE: This will not be the world tranform of the actor if an offset transform has been set. In that case you will need to multiply the offset by the world transform.
See also
- Sub GetWheelConnectionPoint(actor, wheel, ByRef x, ByRef y, ByRef z)
Gets the point in local space that a wheel is connected to a vehicle at.
See also
- Sub GetWheelDirection(actor, wheel ByRef x, ByRef y, ByRef z)
Gets the direction of a wheel on a vehicle.
- Sub GetWheelAxel(actor, wheel, ByRef x, ByRef y, ByRef z)
Get the axel direction of a wheel on a vehiclet.
See also
- Function GetWheelSuspensionLength(actor, wheel)
Returns the suspsension rest length of a wheel.
See also
- Function GetWheelMaxSuspensionTravel(actor, wheel)
Returns the max suspension travel distance.
This value is the maximum distance the suspension is allowed to extend or compress from its rest length set with SetSuspensionLength().
See also
- Function GetWheelRadius(actor, wheel)
You will never guess what this returns.
See also
- Function GetWheelSuspensionStiffness(actor, wheel)
Returns the suspension stiffness of a wheel.
- Higher stiffness - stronger upward force for the same compression.
- Lower stiffness - softer suspension.
See also
- Function GetWheelDampingCompression(actor, wheel)
Returns the damping compression of a wheel.
- Function GetWheelDampingRelaxation(actor, wheel)
Returns the damping relaxation of a wheel.
- Function GetWheelFrictionSlip(actor, wheel)
Returns the friction slip of a wheel.
See also
- Function GetWheelRotation(actor, wheel)
Returns a wheel's spin rotation.
See also
- Function GetWheelRotationDelta(actor, wheel)
Returns how much the wheels spin angle changed since the last frame.
See also
- Function GetWheelRollInfluence(actor, wheel)
Returns the roll_influence for a wheel.
Roll influence controls how much a wheel’s suspension force contributes to the vehicle’s body roll (sideways tipping).
It’s essentially a stability scaling factor.
See also
- Function GetWheelEngineForce(actor, wheel)
Returns the engine force currently applied to a wheel.
See also
- Function GetWheelBrake(actor, wheel)
Returns the brake value of a wheel on a vehicle.
See also
- Function WheelIsFront(actor, wheel)
Returns TRUE if a wheel is set as a front wheel.
- Function GetWheelInverseContactSuspension(actor, wheel)
Returns the clipped inverse contact dot suspension.
This value is a stability factor used to adjust suspension force when the ground contact surface is tilted.
It prevents suspension forces from exploding when the wheel contacts steep surfaces.
See also
- Function GetWheelSuspensionVelocity(actor, wheel)
Returns the suspension velocity.
This value is the speed that the suspension compresses or extends at.
See also
- Sub ResetVehicleSuspension(actor)
Sets the suspension of a vehicle back to its base length.
- Sub SetWheelSteeringValue(actor, wheel, steering)
Sets the steering value for a wheel.
See also
- Sub ApplyWheelEngineForce(actor, wheel, force)
Apply force to a wheel.
NOTE: For movement, you can apply force to a vehicle the same way you apply it to any actor. Refer to the actor physics section for documentation on that.
- Sub SetWheelBrake(actor, wheel, brake)
Sets the brake value for a wheel.
See also
- Sub SetVehiclePitchControl(actor, brake)
Sets a vehicles pitch control.
Pitch control is a tuning parameter that adds an extra torque to the chassis based on engine force to control how much the vehicle tilts forward or backward under acceleration and braking.
See also
- Sub SetWheelConnectionPoint(actor, wheel, x, y, z)
Sets the point in local space where the wheel connects to the chassis.
See also
- Sub SetWheelDirection(actor, wheel, x, y, z)
Sets a wheel's direction.
This direction is the direction the suspension of the wheel extends to and not the direction the wheel rolls. Basically, if the suspension is pointing straight down then the direction would be (0, -1, 0).
See also
- Sub SetWheelAxel(actor, wheel, x, y, z)
Sets the wheel axel direction.
The axel is the axis the wheel rotates around.
See also
- Sub SetWheelSuspensionLength(actor, wheel, s_length)
Sets the suspsension rest length of a wheel.
See also
- Sub SetWheelMaxSuspensionTravel(actor, wheel, max_travel)
Sets the max suspension travel distance.
This value is the maximum distance the suspension is allowed to extend or compress from its rest length set with SetSuspensionLength().
See also
- Sub SetWheelRadius(actor, wheel, radius)
Sets the radius of a wheel.
See also
- Sub SetWheelSuspensionStiffness(actor, wheel, stiffness)
Sets the suspension stiffness of a wheel.
- Higher stiffness - stronger ypward force for the same compression.
- Lower stiffness - softer suspension.
See also
- Sub SetWheelDampingCompression(actor, wheel, dcomp_value)
Sets a wheels damping compression.
- Sub SetWheelDampingRelaxation(actor, wheel, drel_value)
Sets a wheels damping relaxation.
- Sub SetWheelFrictionSlip(actor, wheel, fslip_value)
Sets the friction slip value for a wheel.
This value determines how much grip a wheel has before it starts sliding
- Lower value - more slippery.
- Higher value - more firm grip.
See also
- Sub SetWheelRotation(actor, wheel, rot)
Sets a wheel's spin rotation.
See also
- Sub SetWheelRollInfluence(actor, wheel, roll_influence)
Sets the roll_influence for a wheel.
Roll influence controls how much a wheel’s suspension force contributes to the vehicle’s body roll (sideways tipping).
It’s essentially a stability scaling factor.
See also
- Sub SetWheelInverseContactSuspension(actor, wheel, c_value)
Sets the clipped inverse contact dot suspension.
This value is a stability factor used to adjust suspension force when the ground contact surface is tilted.
It prevents suspension forces from exploding when the wheel contacts steep surfaces.
See also
- Sub SetWheelSuspensionVelocity(actor, wheel, velocity)
Sets the suspension velocity.
This value is the speed that the suspension compresses or extends at.
See also
- Sub SetWheelActorOffsetTransform(actor, wheel, t_matrix)
Sets an local offset transform for the wheel actor. This is mainly for when the actors local transform does not line up with the axis for the vehicle.
Refer to the Vehicle demo to see an example of this.
See also
- Sub GetWheelActorOffsetTransform(actor, wheel, t_matrix)
Stores the local offset transform for the wheel actor in t_matrix.
This is mainly for when the actors local transform does not line up with the axis for the vehicle.
Refer to the Vehicle demo to see an example of this.
See also
- Function GetVehiclePitchControl(actor)
Returns the pitch control for a vehicle.
See also