VehicleBody

Inherits: PhysicsBody < CollisionObject < Spatial < Node < Object

Category: Core

Brief Description

Member Functions

Vector3 get_linear_velocity ( ) const

Member Variables

Member Function Description

  • 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()