Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# BulletVehicle Class Reference

List of all members.

## Public Member Functions
| BulletVehicle (BulletWorld world, BulletRigidBodyNode chassis)
| Creates a new BulletVehicle instance in the given world and with a chassis node.
| applyEngineForce (float force, int idx)
| Applies force at the wheel with index idx for acceleration.
BulletWheel | createWheel ()
| Factory method for creating wheels for this vehicle instance.
BulletRigidBodyNode | getChassis ()
| Returns the chassis of this vehicle.
float | getCurrentSpeedKmHour ()
| Returns the current speed in kilometers per hour.
Vec3 | getForwardVector ()
| Returns the forward vector representing the car's actual direction of movement.
int | getNumWheels ()
| Returns the number of wheels this vehicle has.
float | getSteeringValue (int idx)
| Returns the steering angle of the wheel with index idx in degrees.
BulletVehicleTuning | getTuning ()
| Returns a reference to the BulletVehicleTuning object of this vehicle which offers various vehicle-global tuning options.
BulletWheel | getWheel (int idx)
| Returns the BulletWheel with index idx.
list | getWheels ()
| resetSuspension ()
| Resets the vehicle's suspension.
| setBrake (float brake, int idx)
| Applies braking force to the wheel with index idx.
| setCoordinateSystem (BulletUpAxis up)
| Specifies which axis is "up".
| setPitchControl (float pitch)
| setSteeringValue (float steering, int idx)
| Sets the steering value (in degrees) of the wheel with index idx.
## Static Public Member Functions
static TypeHandle | getClassType ()

## Constructor & Destructor Documentation

BulletVehicle | ( | BulletWorld | world,
|  | BulletRigidBodyNode | chassis
| ) |  |

Creates a new BulletVehicle instance in the given world and with a chassis node.

## Member Function Documentation

applyEngineForce | ( | float | force,
|  | int | idx
| ) |  |

Applies force at the wheel with index idx for acceleration.

BulletWheel createWheel | ( |  | ) |

Factory method for creating wheels for this vehicle instance.

BulletRigidBodyNode getChassis | ( |  | ) |

Returns the chassis of this vehicle.

The chassis is a rigid body node.

static TypeHandle getClassType | ( |  | ) | `[static]`

float getCurrentSpeedKmHour | ( |  | ) |

Returns the current speed in kilometers per hour.

Convert to miles using: km/h * 0.62 = mph

Vec3 getForwardVector | ( |  | ) |

Returns the forward vector representing the car's actual direction of movement.

The forward vetcor is given in global coordinates.

int getNumWheels | ( |  | ) |

Returns the number of wheels this vehicle has.

float getSteeringValue | ( | int | idx | ) |

Returns the steering angle of the wheel with index idx in degrees.

BulletVehicleTuning getTuning | ( |  | ) |

Returns a reference to the BulletVehicleTuning object of this vehicle which offers various vehicle-global tuning options.

Make sure to configure this before adding wheels!

BulletWheel getWheel | ( | int | idx | ) |

Returns the BulletWheel with index idx.

Causes an AssertionError if idx is equal or larger than the number of wheels.

list getWheels | ( |  | ) |

resetSuspension | ( |  | ) |

Resets the vehicle's suspension.

setBrake | ( | float | brake,
|  | int | idx
| ) |  |

Applies braking force to the wheel with index idx.

setCoordinateSystem | ( | BulletUpAxis | up | ) |

Specifies which axis is "up".

Nessecary for the vehicle's suspension to work properly!

setPitchControl | ( | float | pitch | ) |

setSteeringValue | ( | float | steering,
|  | int | idx
| ) |  |

Sets the steering value (in degrees) of the wheel with index idx.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties