Module GameTypes :: Class KX_VehicleWrapper
[hide private]
[frames] | no frames]

Class KX_VehicleWrapper

source code

PyObjectPlus --+
               |
              KX_VehicleWrapper

KX_VehicleWrapper

TODO - description

Instance Methods [hide private]
 
addWheel(wheel, attachPos, attachDir, axleDir, suspensionRestLength, wheelRadius, hasSteering)
Add a wheel to the vehicle
source code
 
applyBraking(force, wheelIndex)
Apply a braking force to the specified wheel
source code
 
applyEngineForce(force, wheelIndex)
Apply an engine force to the specified wheel
source code
integer
getConstraintId()
Get the constraint ID
source code
integer
getConstraintType()
Returns the constraint type.
source code
integer
getNumWheels()
Returns the number of wheels.
source code
TODO - type should be quat as per method name but from the code it looks like a matrix
getWheelOrientationQuaternion(wheelIndex)
Returns the wheel orientation as a quaternion.
source code
list[x, y, z]
getWheelPosition(wheelIndex)
Returns the position of the specified wheel
source code
float
getWheelRotation(wheelIndex)
Returns the rotation of the specified wheel
source code
 
setRollInfluence(rollInfluece, wheelIndex)
Set the specified wheel's roll influence.
source code
 
setSteeringValue(steering, wheelIndex)
Set the specified wheel's steering
source code
 
setSuspensionCompression(compression, wheelIndex)
Set the specified wheel's compression
source code
 
setSuspensionDamping(damping, wheelIndex)
Set the specified wheel's damping
source code
 
setSuspensionStiffness(stiffness, wheelIndex)
Set the specified wheel's stiffness
source code
 
setTyreFriction(friction, wheelIndex)
Set the specified wheel's tyre friction
source code
    Inherited from PyObjectPlus
bool
isA(game_type)
Check if this is a type or a subtype game_type.
source code
Instance Variables [hide private]
    Inherited from PyObjectPlus
bool invalid
Test if the object has been freed by the game engine and is no longer valid.
Method Details [hide private]

addWheel(wheel, attachPos, attachDir, axleDir, suspensionRestLength, wheelRadius, hasSteering)

source code 
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)

source code 
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)

source code 
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()

source code 
Get the constraint ID
Returns: integer
the constraint id

getConstraintType()

source code 
Returns the constraint type.
Returns: integer
constraint type

getNumWheels()

source code 
Returns the number of wheels.
Returns: integer
the number of wheels for this vehicle

getWheelOrientationQuaternion(wheelIndex)

source code 
Returns the wheel orientation as a quaternion.
Parameters:
  • wheelIndex (integer) - the wheel index
Returns: TODO - type should be quat as per method name but from the code it looks like a matrix
TODO Description

getWheelPosition(wheelIndex)

source code 
Returns the position of the specified wheel
Parameters:
  • wheelIndex (integer) - the wheel index
Returns: list[x, y, z]
position vector

getWheelRotation(wheelIndex)

source code 
Returns the rotation of the specified wheel
Parameters:
  • wheelIndex (integer) - the wheel index
Returns: float
the wheel rotation

setRollInfluence(rollInfluece, wheelIndex)

source code 
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)

source code 
Set the specified wheel's steering
Parameters:
  • steering (float) - the wheel steering
  • wheelIndex (integer) - the wheel index

setSuspensionCompression(compression, wheelIndex)

source code 
Set the specified wheel's compression
Parameters:
  • compression (float) - the wheel compression
  • wheelIndex (integer) - the wheel index

setSuspensionDamping(damping, wheelIndex)

source code 
Set the specified wheel's damping
Parameters:
  • damping (float) - the wheel damping
  • wheelIndex (integer) - the wheel index

setSuspensionStiffness(stiffness, wheelIndex)

source code 
Set the specified wheel's stiffness
Parameters:
  • stiffness (float) - the wheel stiffness
  • wheelIndex (integer) - the wheel index

setTyreFriction(friction, wheelIndex)

source code 
Set the specified wheel's tyre friction
Parameters:
  • friction (float) - the tyre friction
  • wheelIndex (integer) - the wheel index