Constructors
constructor
- new RigidVehicle(options?): RigidVehicle
Parameters
Optional
options: {
chassisBody?: Body;
coordinateSystem?: Vec3;
}
Optional
chassisBody?: Body
Optional
coordinateSystem?: Vec3
Properties
wheelForces
wheelForces: number[]
Methods
addToWorld
- addToWorld(world): void
Returns void
addWheel
- addWheel(options?): number
Parameters
Optional
options: {
axis?: Vec3;
body?: Body;
direction?: Vec3;
position?: Vec3;
}
Optional
axis?: Vec3
Optional
body?: Body
Optional
direction?: Vec3
Optional
position?: Vec3
Returns number
applyWheelForce
- applyWheelForce(value, wheelIndex): void
Parameters
value: number
wheelIndex: number
Returns void
disableMotor
- disableMotor(wheelIndex): void
Returns void
getWheelSpeed
- getWheelSpeed(wheelIndex): number
Returns number
removeFromWorld
- removeFromWorld(world): void
Returns void
setMotorSpeed
- setMotorSpeed(value, wheelIndex): void
Parameters
value: number
wheelIndex: number
Returns void
setSteeringValue
- setSteeringValue(value, wheelIndex): void
Parameters
value: number
wheelIndex: number
Returns void
setWheelForce
- setWheelForce(value, wheelIndex): void
Parameters
value: number
wheelIndex: number
Returns void
Simple vehicle helper class with spherical rigid body wheels.