Component
Physics
(NOTE) A controller for a high speed physics based car. The car is controlled with a steer, gas, and brake scalar. The car will raycast wheel positions to try to keep the wheels on the ground and then apply friction and normal forces to propel the car.
Methods | Properties | Base Classes | Derived Classes |
---|---|---|---|
NumberOfWheelsInContact | Active | component | |
Constructor | AntiLockBrakes | ||
Brake | |||
DebugDraw | |||
Gas | |||
GripScalar | |||
MaxSpeed | |||
MaxTorque | |||
Steer | |||
TorqueGovernor | |||
WheelCogs | |||
WheelFrictionFrontRollCoef | |||
WheelFrictionSideRollCoef |
Properties
Active : boolean
Whether or not the car will run any logic at all. If this is false wheels will not work, they will not behave as springs, drive, or anything else.
var Active : Boolean
AntiLockBrakes : boolean
Prevents the car from entering dynamic friction when applying brakes. If the brake would start to skid, the brake force is clamped to the max amount that will not slip.
var AntiLockBrakes : Boolean
Brake : real
How much the brake is being pressed [0,1] where 1 is full brake.
var Brake : Real
DebugDraw : boolean
Whether or not the car should debug draw.
var DebugDraw : Boolean
Gas : real
How much the gas is being pressed [-1,1] where -1 is full reverse.
var Gas : 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
MaxSpeed : real
The desired maximum speed of the car. Similar to a speed governor.
var MaxSpeed : Real
MaxTorque : real
The maximum torque the engine can apply to try to reach the max speed.
var MaxTorque : Real
Steer : real
How much the wheel is being steered. This is measured in radians about this object's y-axis.
var Steer : Real
TorqueGovernor : boolean
Governs the max torque that the engine can apply. This is used to keep the wheels from spinning out (slipping) when too high of a torque is applied. If the tires would slip, the engine will apply the maximum torque for the tires to not slip.
var TorqueGovernor : Boolean
WheelCogs : carwheelarray
read-only
Read-only array of wheels belonging to this car.
var WheelCogs : CarWheelArray
WheelFrictionFrontRollCoef : real
Coefficient used to apply the forward friction force closer to the car's center of mass. 1 applies the force at the wheel position, 0 applies the force at the point along the contact normal closest to the center of mass.
var WheelFrictionFrontRollCoef : Real
WheelFrictionSideRollCoef : real
Coefficient used to apply the side friction force closer to the car's center of mass. 1 applies the force at the wheel position, 0 applies the force at the point along the contact normal closest to the center of mass.
var WheelFrictionSideRollCoef : Real
Methods
NumberOfWheelsInContact : integer
The number of wheels currently in contact with an object. |Name|Type|Description| |---|---|---|
function NumberOfWheelsInContact() : Integer
PhysicsCar : Void
constructor
Name Type Description function PhysicsCar()