MF_B_MobilityWheel : MF_AbstractMobility
This describes a simple wheeled vehicle.
Inherited Variables
throttle, monitor, navTarget, useIntercept, interceptForPlatform, navTargetAim, myRigidbody, velocity, fxScript
monitor will be equal to the throttle setting.
Inherited Methods
UnitVelocity()
Override ModifiedPosition : Vector3 ( pos : Vector3 )
Will return the position but with the y value made to be the same as the vehicle y value.
Public Variables
throttleRate : float
The rate at which the throttle setting may change in percent/sec. Use to allow gradual acceleration of wheels to prevent slippage.
wheels : WheelObject[]
An array of this vehicle's wheels.
Public Class WheelObject
wheelCollider : WheelCollider
This wheel’s WheelCollider.
torque : float
The max torque of this wheel.
steerAngleMax : float ( 0 to 90 )
The maximum angle this wheel may steer. 0 = no steering. Negative numbers will cause this wheel to steer in the reverse direction. This could be used to give rear wheels the ability to steer.
steerRate : float
The rate that this wheel can change steering angle in deg/sec.
wheelObject : Transform
An optional transform of this wheel’s graphical elements.
If blank, will try to assign the first child of the wheelCollider object as the wheelObject.
Public Methods
Steer : void ( goal : Vector3 )
Will cause steerable wheels to steer towards goal.
Move : void ( percent : float )
Will set the throttle goal to percent. The torque of each wheel will be multiplied by the current throttle setting.
This describes a simple wheeled vehicle.
Inherited Variables
throttle, monitor, navTarget, useIntercept, interceptForPlatform, navTargetAim, myRigidbody, velocity, fxScript
monitor will be equal to the throttle setting.
Inherited Methods
UnitVelocity()
Override ModifiedPosition : Vector3 ( pos : Vector3 )
Will return the position but with the y value made to be the same as the vehicle y value.
Public Variables
throttleRate : float
The rate at which the throttle setting may change in percent/sec. Use to allow gradual acceleration of wheels to prevent slippage.
wheels : WheelObject[]
An array of this vehicle's wheels.
Public Class WheelObject
wheelCollider : WheelCollider
This wheel’s WheelCollider.
torque : float
The max torque of this wheel.
steerAngleMax : float ( 0 to 90 )
The maximum angle this wheel may steer. 0 = no steering. Negative numbers will cause this wheel to steer in the reverse direction. This could be used to give rear wheels the ability to steer.
steerRate : float
The rate that this wheel can change steering angle in deg/sec.
wheelObject : Transform
An optional transform of this wheel’s graphical elements.
If blank, will try to assign the first child of the wheelCollider object as the wheelObject.
Public Methods
Steer : void ( goal : Vector3 )
Will cause steerable wheels to steer towards goal.
Move : void ( percent : float )
Will set the throttle goal to percent. The torque of each wheel will be multiplied by the current throttle setting.