VehicleBody

Inherits: PhysicsBody < CollisionObject < Spatial < Node < Object

Category: Core

Brief Description

Member Functions

float

get_brake ( ) const

float

get_engine_force ( ) const

float

get_friction ( ) const

Vector3

get_linear_velocity ( ) const

float

get_mass ( ) const

float

get_steering ( ) const

void

set_brake ( float brake )

void

set_engine_force ( float engine_force )

void

set_friction ( float friction )

void

set_mass ( float mass )

void

set_steering ( float steering )

Member Function Description

  • float get_brake ( ) const

  • float get_engine_force ( ) const

  • float get_friction ( ) const

  • Vector3 get_linear_velocity ( ) const

Returns the VehicleBody’s velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example:

# vehicle is an instance of VehicleBody
var speed = vehicle.get_linear_velocity().length()
  • float get_mass ( ) const

  • float get_steering ( ) const

  • void set_brake ( float brake )

  • void set_engine_force ( float engine_force )

  • void set_friction ( float friction )

  • void set_mass ( float mass )

  • void set_steering ( float steering )