Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:2.10

Description

Description:Returns the orientation of an object selection in the model space (vectorDir and vectorUp for an object component).

Syntax

Syntax:object selectionVectorDirAndUp selection
Parameters:
  • object: Object - Object to check.
  • selection: String - Named Selection (see the VBS3 Developer Reference).
Return Value:Array - [vectorDir, vectorUp], where vectorDir and vectorUp are 3-dimensional direction vectors, indicating [x, y, z] (left / right, forward / back, up / down).

Examples

Examples:
Returned vector values of player head and weapon selection are applied to arrow objects:
while {true} do {
headArrow setPos (player modelToWorld [0,0,0]);
headArrow setVectorDirAndUp (player selectionVectorDirAndUp "head");
gunArrow setPos (player modelToWorld [0,1,-1]);
gunArrow setVectorDirAndUp (player selectionVectorDirAndUp "weapon") };

Additional Information

See also: selectionCenter, setVectorDirAndUp
Multiplayer:
Problems:

Notes