KX_VehicleWrapper(PyObjectPlus)
base class — PyObjectPlus
-
class bge.types.KX_VehicleWrapper(PyObjectPlus)
KX_VehicleWrapper
TODO - description
-
addWheel(wheel, attachPos, attachDir, axleDir, suspensionRestLength, wheelRadius, hasSteering)
Add a wheel to the vehicle
Parameters: |
- wheel (KX_GameObject or a KX_GameObject name) – The object to use as a wheel.
- attachPos (vector of 3 floats) – The position that this wheel will attach to.
- attachDir (vector of 3 floats) – The direction this wheel points.
- axleDir (vector of 3 floats) – The direction of this wheels axle.
- suspensionRestLength (float) – TODO - Description
- wheelRadius (float) – The size of the wheel.
|
-
applyBraking(force, wheelIndex)
Apply a braking force to the specified wheel
Parameters: |
- force (float) – the brake force
- wheelIndex (integer) – index of the wheel where the force needs to be applied
|
-
applyEngineForce(force, wheelIndex)
Apply an engine force to the specified wheel
Parameters: |
- force (float) – the engine force
- wheelIndex (integer) – index of the wheel where the force needs to be applied
|
-
getConstraintId()
Get the constraint ID
Returns: | the constraint id |
Return type: | integer |
-
getConstraintType()
Returns the constraint type.
Returns: | constraint type |
Return type: | integer |
-
getNumWheels()
Returns the number of wheels.
Returns: | the number of wheels for this vehicle |
Return type: | integer |
-
getWheelOrientationQuaternion(wheelIndex)
Returns the wheel orientation as a quaternion.
Parameters: | wheelIndex (integer) – the wheel index |
Returns: | TODO Description |
Return type: | TODO - type should be quat as per method name but from the code it looks like a matrix |
-
getWheelPosition(wheelIndex)
Returns the position of the specified wheel
Parameters: | wheelIndex (integer) – the wheel index |
Returns: | position vector |
Return type: | list[x, y, z] |
-
getWheelRotation(wheelIndex)
Returns the rotation of the specified wheel
Parameters: | wheelIndex (integer) – the wheel index |
Returns: | the wheel rotation |
Return type: | float |
-
setRollInfluence(rollInfluece, wheelIndex)
Set the specified wheel’s roll influence.
The higher the roll influence the more the vehicle will tend to roll over in corners.
Parameters: |
- rollInfluece (float) – the wheel roll influence
- wheelIndex (integer) – the wheel index
|
-
setSteeringValue(steering, wheelIndex)
Set the specified wheel’s steering
Parameters: |
- steering (float) – the wheel steering
- wheelIndex (integer) – the wheel index
|
-
setSuspensionCompression(compression, wheelIndex)
Set the specified wheel’s compression
Parameters: |
- compression (float) – the wheel compression
- wheelIndex (integer) – the wheel index
|
-
setSuspensionDamping(damping, wheelIndex)
Set the specified wheel’s damping
Parameters: |
- damping (float) – the wheel damping
- wheelIndex (integer) – the wheel index
|
-
setSuspensionStiffness(stiffness, wheelIndex)
Set the specified wheel’s stiffness
Parameters: |
- stiffness (float) – the wheel stiffness
- wheelIndex (integer) – the wheel index
|
-
setTyreFriction(friction, wheelIndex)
Set the specified wheel’s tyre friction
Parameters: |
- friction (float) – the tyre friction
- wheelIndex (integer) – the wheel index
|