Table of Contents

Component Physics

(NOTE) A wheel for a high speed physics based car. Each wheel contains properties to describe how to interact with the world (eg. spring forces, friction, etc...).

Methods Properties Base Classes Derived Classes
Constructor Active component
ContactedObject
ContactNormal
ContactPoint
DampingCompressionRatio
DampingRelaxationRatio
DriveFactor
ForwardDynamicFriction
ForwardImpulse
ForwardStaticFriction
FrequencyHz
Grip
GripScalar
Is2DWheel
IsDriveWheel
IsInContact
IsSliding
MaxBrakeStrength
MaxSpringCompressionDistance
MaxSpringForce
MaxSpringRelaxationDistance
NormalImpulse
PhysicsCarPath
PreRotation
Radius
Rotation
RotationalVelocity
SideDynamicFriction
SideImpulse
SideStaticFriction
SpringLength
SpringMaxLength
SpringMinLength
SpringRestLength
SpringStartLength
SteerFactor
WheelLocalStartPosition
WorldAngularVelocity
WorldAxleAxis
WorldForwardAxis
WorldLinearVelocity
WorldSpringAxis
WorldWheelBasis

Properties


Active : boolean

Should this wheel calculate forces for the current PhysicsCar.

var Active : Boolean

ContactedObject : cog

read-only

The object that this wheel is currently in contact with.

var ContactedObject : Cog

ContactNormal : real3

read-only

The normal of the surface where the wheel is currently in contact. Will be the zero vector if there is no contact.

var ContactNormal : Real3

ContactPoint : real3

read-only

The point in world space where the wheel is currently in contact. Will be the zero vector if there is no contact.

var ContactPoint : Real3

DampingCompressionRatio : real

The damping ratio when the spring is compressing (0: no damping, 1 critical damping)

var DampingCompressionRatio : Real

DampingRelaxationRatio : real

The damping ratio when the spring is relaxing (0: no damping, 1 critical damping)

var DampingRelaxationRatio : Real

DriveFactor : real

Used to alter the direction this wheel turns when the motor receives power. Typically set to 1 or -1. Useful to cause a wheel to temporarily rotate backwards without having to change its basis.

var DriveFactor : Real

ForwardDynamicFriction : real

Determines the force applied in the forward direction when the wheel is in dynamic friction and therefore slipping. (i.e. force = muK * Fnormal)

var ForwardDynamicFriction : Real

ForwardImpulse : real

read-only

The forward impulse (drive force) being exerted by the wheel.

var ForwardImpulse : Real

ForwardStaticFriction : real

Used with Coulomb's friction to determine when the wheel will start slipping in the forward direction. (i.e. the friction is bound by muS * Fnormal).

var ForwardStaticFriction : Real

FrequencyHz : real

The frequency at which the spring of this wheel oscillates per second.

var FrequencyHz : Real

Grip : real

read-only

A coefficient from 0 to 1 that represents how much grip the wheel has.

var Grip : Real

GripScalar : real

Artificially increases the grip of the car (where 2 is twice the grip). The total grip scalar is computed as CarGripScalar * WheelGripScalar so the total car can be easily tweaked while allowing individual wheel tweaks.

var GripScalar : Real

Is2DWheel : boolean

Does this wheel only operate in 2D? Ignores the side friction axis.

var Is2DWheel : Boolean

IsDriveWheel : boolean

Drive wheels turn when the car body has gas pressed.

var IsDriveWheel : Boolean

IsInContact : boolean

read-only

If the wheel is currently in contact with an object.

var IsInContact : Boolean

IsSliding : boolean

read-only

If the wheel is currently sliding. This means that the wheel is slipping from spinning too fast (using dynamic friction instead of static).

var IsSliding : Boolean

MaxBrakeStrength : real

The max force that this wheel can exert to break.

var MaxBrakeStrength : Real

MaxSpringCompressionDistance : real

The max distance that a spring can compress in one frame.

var MaxSpringCompressionDistance : Real

MaxSpringForce : real

The maximum force that the wheel's spring can exert.

var MaxSpringForce : Real

MaxSpringRelaxationDistance : real

The max distance that a spring can relax in one frame.

var MaxSpringRelaxationDistance : Real

NormalImpulse : real

read-only

The normal impulse (spring force) being exerted by the wheel.

var NormalImpulse : Real

PhysicsCarPath : cogpath

The path to the car that this is a wheel for.

var PhysicsCarPath : CogPath

PreRotation : quaternion

Used to rotate the wheel before taking into account it's transform. Typically used to rotate a cylinder to align with a model.

var PreRotation : Quaternion

Radius : real

The radius of the wheel.

var Radius : Real

Rotation : real

read-only

The current rotation of the wheel in radians about it's axle.

var Rotation : Real

RotationalVelocity : real

read-only

The current rotational velocity of the wheel about it's axle.

var RotationalVelocity : Real

SideDynamicFriction : real

Same as ForwardDynamicFriction, but in the side direction. See SideStaticFriction for a why these are separated.

var SideDynamicFriction : Real

SideImpulse : real

read-only

The side impulse (side friction) being exerted by the wheel.

var SideImpulse : Real

SideStaticFriction : real

Same as ForwardStaticFriction, but in the side direction. Forward and side friction are separated since the forward direction is rolling friction and the side direction is sliding friction.

var SideStaticFriction : Real

SpringLength : real

read-only

The current length of the spring.

var SpringLength : Real

SpringMaxLength : real

The maximum length of the spring of the wheel. If the wheel hits something further away than this length (plus the wheel radius) then that object will be ignored.

var SpringMaxLength : Real

SpringMinLength : real

The minimum length of the spring of the wheel. If a wheel cast hits an object at a time before min but after start then the wheel will still collide with this object but the spring forces and visuals will be at the min spring length. This is useful for putting the starting raycast position inside of the object so as to avoid tunneling but still having the wheel only visually display where it should.

var SpringMinLength : Real

SpringRestLength : real

The rest length of the spring.

var SpringRestLength : Real

SpringStartLength : real

The t value to start the raycast at. This t value is 0 at the wheel position and travels in the direction of the wheel spring direction. This value is used to modify where the raycast actually starts relative to the start position.

var SpringStartLength : Real

SteerFactor : real

How much this wheel steers. [0, 1] where 1 is the max steering of the car.

var SteerFactor : Real

WheelLocalStartPosition : real3

The local position on the car body that the wheel starts at (raycasts from).

var WheelLocalStartPosition : Real3

WorldAngularVelocity : real3

read-only

The axis that represents the world angular velocity of the wheel.

var WorldAngularVelocity : Real3

WorldAxleAxis : real3

read-only

The current axis of the wheel's axle in world space.

var WorldAxleAxis : Real3

WorldForwardAxis : real3

read-only

The current axis of the wheel's forward in world space.

var WorldForwardAxis : Real3

WorldLinearVelocity : real3

read-only

The velocity of the center of the wheel while taking into account the car's velocity.

var WorldLinearVelocity : Real3

WorldSpringAxis : real3

read-only

The current world-space spring axis of the wheel.

var WorldSpringAxis : Real3

WorldWheelBasis : quaternion

Determines what directions the forward, axle, and spring are on the wheel. The forward direction is taken from the x-axis of the basis. Likewise the axle is from the y-axis and the spring is from the z-axis. Use ToQuaternion to construct this.

var WorldWheelBasis : Quaternion

Methods


PhysicsCarWheel : Void

constructor

Name Type Description
function PhysicsCarWheel()