BulletVehicle

from panda3d.bullet import BulletVehicle
class BulletVehicle

Bases: TypedReferenceCount

Simulates a raycast vehicle which casts a ray per wheel at the ground as a cheap replacement for complex suspension simulation. The suspension can be tuned in various ways. It is possible to add a (probably) arbitrary number of wheels.

Inheritance diagram

Inheritance diagram of BulletVehicle

__init__(*args, **kwargs)
applyEngineForce()

C++ Interface: apply_engine_force(const BulletVehicle self, float force, int idx)

/**
  • Applies force at the wheel with index idx for acceleration.

*/

apply_engine_force()

C++ Interface: apply_engine_force(const BulletVehicle self, float force, int idx)

/**
  • Applies force at the wheel with index idx for acceleration.

*/

chassis
createWheel()

C++ Interface: create_wheel(const BulletVehicle self, float suspension_rest_length)

// Wheels

/**
  • Factory method for creating wheels for this vehicle instance.

*/

create_wheel()

C++ Interface: create_wheel(const BulletVehicle self, float suspension_rest_length)

// Wheels

/**
  • Factory method for creating wheels for this vehicle instance.

*/

current_speed_km_hour
forward_vector
getChassis()

C++ Interface: get_chassis(const BulletVehicle self)

/**
  • Returns the chassis of this vehicle. The chassis is a rigid body node.

*/

getClassType()

C++ Interface: get_class_type()

getCurrentSpeedKmHour()

C++ Interface: get_current_speed_km_hour(BulletVehicle self)

/**
  • Returns the current speed in kilometers per hour. Convert to miles using:

  • km/h * 0.62 = mph

*/

getForwardVector()

C++ Interface: get_forward_vector(BulletVehicle self)

/**
  • Returns the forward vector representing the car’s actual direction of

  • movement. The forward vetcor is given in global coordinates.

*/

getNumWheels()

C++ Interface: get_num_wheels(BulletVehicle self)

/**
  • Returns the number of wheels this vehicle has.

*/

getSteeringValue()

C++ Interface: get_steering_value(BulletVehicle self, int idx)

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

*/

getTuning()

C++ Interface: get_tuning(const BulletVehicle self)

// Tuning

// Tuning

/**
  • 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!

*/

getWheel()

C++ Interface: get_wheel(BulletVehicle self, int idx)

/**
  • Returns the BulletWheel with index idx. Causes an AssertionError if idx is

  • equal or larger than the number of wheels.

*/

getWheels()
get_chassis()

C++ Interface: get_chassis(const BulletVehicle self)

/**
  • Returns the chassis of this vehicle. The chassis is a rigid body node.

*/

get_class_type()

C++ Interface: get_class_type()

get_current_speed_km_hour()

C++ Interface: get_current_speed_km_hour(BulletVehicle self)

/**
  • Returns the current speed in kilometers per hour. Convert to miles using:

  • km/h * 0.62 = mph

*/

get_forward_vector()

C++ Interface: get_forward_vector(BulletVehicle self)

/**
  • Returns the forward vector representing the car’s actual direction of

  • movement. The forward vetcor is given in global coordinates.

*/

get_num_wheels()

C++ Interface: get_num_wheels(BulletVehicle self)

/**
  • Returns the number of wheels this vehicle has.

*/

get_steering_value()

C++ Interface: get_steering_value(BulletVehicle self, int idx)

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

*/

get_tuning()

C++ Interface: get_tuning(const BulletVehicle self)

// Tuning

// Tuning

/**
  • 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!

*/

get_wheel()

C++ Interface: get_wheel(BulletVehicle self, int idx)

/**
  • Returns the BulletWheel with index idx. Causes an AssertionError if idx is

  • equal or larger than the number of wheels.

*/

get_wheels()
resetSuspension()

C++ Interface: reset_suspension(const BulletVehicle self)

/**
  • Resets the vehicle’s suspension.

*/

reset_suspension()

C++ Interface: reset_suspension(const BulletVehicle self)

/**
  • Resets the vehicle’s suspension.

*/

setBrake()

C++ Interface: set_brake(const BulletVehicle self, float brake, int idx)

/**
  • Applies braking force to the wheel with index idx.

*/

setCoordinateSystem()

C++ Interface: set_coordinate_system(const BulletVehicle self, int up)

/**
  • Specifies which axis is “up”. Nessecary for the vehicle’s suspension to

  • work properly!

*/

setPitchControl()

C++ Interface: set_pitch_control(const BulletVehicle self, float pitch)

/**

*/

setSteeringValue()

C++ Interface: set_steering_value(const BulletVehicle self, float steering, int idx)

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

*/

set_brake()

C++ Interface: set_brake(const BulletVehicle self, float brake, int idx)

/**
  • Applies braking force to the wheel with index idx.

*/

set_coordinate_system()

C++ Interface: set_coordinate_system(const BulletVehicle self, int up)

/**
  • Specifies which axis is “up”. Nessecary for the vehicle’s suspension to

  • work properly!

*/

set_pitch_control()

C++ Interface: set_pitch_control(const BulletVehicle self, float pitch)

/**

*/

set_steering_value()

C++ Interface: set_steering_value(const BulletVehicle self, float steering, int idx)

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

*/

tuning

Tuning

wheels