Introduced in

Version:1.00

Description

Description:

Set the object orientation (given as direction and up vector).

Since V1.30+, accepts additional parameter which, when an object is attached, specifies if the applied vectors are relative to the parent object orientation.

Syntax

Syntax:vehicle setVectorDirAndUp [vectorDir, vectorUp, relative]
Parameters:
  • vehicle: Object - Object that the vectors are applied to.
  • vectorDir: Array - Direction vector applied to the object.
  • vectorUp: Array - Up vector applied to the object.
  • relative: Boolean - Specifies if the vectors are relative to parent (optional, default: false) (V1.30+).
Return Value:Nothing

Examples

Examples:
vehicle setVectorDirAndUp [[0,1,0],[0,0,1]] // Direction - north, Up - up, world space coordinates
vehicle setVectorDirAndUp [[0,0,1],[0,1,0],false] // Direction - up, Up - north, world space coordinates
attached setVectorDirAndUp [[1,0,0],[0,0,1],true] // Direction - right, Up - up, parent model space coordinates
attached setVectorDirAndUp [[0,0,1],[1,0,0],true] // Direction - up, Up - right, parent model space coordinates

Additional Information

See also:fn vbs setPitchBank, vectorUp, setVectorUp, vectorDir, setVectorDir
Multiplayer:
Problems:

Notes