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




Introduced in

Version:1.30

Description

Description:Rotates a point in the object model space, and returns it in world coordinates. If the last parameter is not specified (center of rotation), then objects center is used.

Syntax

Syntax:[position, object, angle, center] call fn_vbs_relativeModelPos
Parameters:
  • position: Position-2 - Point to rotate.
  • object: Object - Object used to return world coordinates.
  • angle: Number - Angle by which the point is rotated.
  • center: Position-2 - Position around which to rotate point (optional, default: Object center).
Return Value:Position-2

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
[[100,100,0], _car, 90] call fn_vbs_relativeModelPos
[[100,100,0], _car, 90, [0,10,0]] call fn_vbs_relativeModelPos

Additional Information

See also: modelToWorld, fn vbs rotatePoint, fn vbs relPos
Multiplayer: 
Problems: 

Notes