Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Introduced in

Version:2.15

Description

Description:

Sets the angular velocity (angular velocity) (see velocityAng) of a vehicle.

For how long this velocity is experienced depends on several factors. For example, the initially applied velocity, the terrain, and the angular damping properties of the vehicle. Some vehicles (for example, planes) have a very high damping defined, and the velocity there may seem instantaneous, whereas for other types of vehicles (for example, boats) that have a very low damping by the vehicle itself and its environment (water), the same applied velocity may go on for several seconds.

Syntax

Syntax:vehicle setVelocityAng velocity
Parameters:
  • vehicle: Object - Affected vehicle.
  • velocity: Vector3D - Change of direction for [x, y, z] in m/sec:
    • For x (pitch), positive means down, negative means up.
    • For y (roll), positive means left, negative means right.
    • For z (yaw), positive means left, negative means right.

      A value of [0, 0, 0] instantaneously stops any ongoing movement for the specific vector.

Return Value:Nothing

Examples

Examples:
Rotates an LCM boat for about 6 seconds (or about 500 degrees):
LCMBoat setVelocityAng [0,0,5];

Rotates an HMMWV for about 1 seconds (or about 200 degrees):
HMMWV setVelocityAng [0,0,5];

Additional Information

See also: velocityAng, setVelocity
Multiplayer:
Problems:

Notes