BulletVehicle¶
-
class BulletVehicle¶
Bases:
TypedReferenceCountSimulates 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
digraph inheritance9e9fa20289 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "BulletVehicle" [URL="acron.bullet.BulletVehicle.html#acron.bullet.BulletVehicle",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "BulletVehicle" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }- BulletVehicle.__init__()¶
Creates a new
BulletVehicleinstance in the given world and with a chassis node.
- BulletVehicle.apply_engine_force()¶
Applies force at the wheel with index idx for acceleration.
- BulletVehicle.create_wheel()¶
Wheels
Factory method for creating wheels for this vehicle instance.
- BulletVehicle.get_chassis()¶
Returns the chassis of this vehicle. The chassis is a rigid body node.
- static BulletVehicle.get_class_type()¶
- BulletVehicle.get_current_speed_km_hour()¶
Returns the current speed in kilometers per hour. Convert to miles using: km/h * 0.62 = mph
- BulletVehicle.get_forward_vector()¶
Returns the forward vector representing the car’s actual direction of movement. The forward vetcor is given in global coordinates.
- BulletVehicle.get_num_wheels()¶
Returns the number of wheels this vehicle has.
- BulletVehicle.get_steering_value()¶
Returns the steering angle of the wheel with index idx in degrees.
- BulletVehicle.get_tuning()¶
Tuning
Tuning
Returns a reference to the
BulletVehicleTuningobject of this vehicle which offers various vehicle-global tuning options. Make sure to configure this before adding wheels!
- BulletVehicle.get_wheel()¶
Returns the
BulletWheelwith index idx. Causes an AssertionError if idx is equal or larger than the number of wheels.
- BulletVehicle.reset_suspension()¶
Resets the vehicle’s suspension.
- BulletVehicle.set_brake()¶
Applies braking force to the wheel with index idx.
- BulletVehicle.set_coordinate_system()¶
Specifies which axis is “up”. Nessecary for the vehicle’s suspension to work properly!
- BulletVehicle.set_pitch_control()¶
- BulletVehicle.set_steering_value()¶
Sets the steering value (in degrees) of the wheel with index idx.