diff options
| author | Agustin Benavidez | 2016-05-21 06:35:55 -0300 |
|---|---|---|
| committer | Rémi Verschelde | 2016-05-21 11:35:55 +0200 |
| commit | 97da9f14abfbbfd8a27f12afef0cd7c46fa425a6 (patch) | |
| tree | 270aca85e170adbbc991edd1f96ee3ab3efd1d6c /doc/base/classes.xml | |
| parent | 436debb0450baffc44956523b8277ecf1a477b7a (diff) | |
| download | godot-97da9f14abfbbfd8a27f12afef0cd7c46fa425a6.tar.gz godot-97da9f14abfbbfd8a27f12afef0cd7c46fa425a6.tar.zst godot-97da9f14abfbbfd8a27f12afef0cd7c46fa425a6.zip | |
Add get_linear_velocity() method to VehicleBody class
Doc added also.
Diffstat (limited to 'doc/base/classes.xml')
| -rw-r--r-- | doc/base/classes.xml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 653fa44d9..64d4100ce 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -41501,6 +41501,20 @@ This method controls whether the position between two cached points is interpola <description> </description> </method> + <method name="get_linear_velocity" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + Returns the vehicle body speed or velocity in a 3D vector, to get the speed in scalar value + get the length of the return vector, the scalar value is in Godot units/seconds, if you + assume 1.0 is a meter, then it is in meters/sec + Example: + # vehicle is an instance of VehicleBody, 1.0 asumed as 1 meter: + var speed_ms = vehicle.get_linear_velocity().length() + # Lets convert it to Km/h: + var speed_kms = speed_ms * 3.6 + </description> + </method> </methods> <constants> </constants> |
