ScarDoc

Start typing to search the SCAR reference.

Function
Util

Util_ScarPos

Converts a 2D top down position to a 3D ScarPosition. returns Position, if y-height is nil, y-height = ground height, terrain ground or walkable

On this page
Util_ScarPos(xpos, zpos, ypos)

Description

3D ScarPositions have the x axis left to right, the z axis in to out, and the y axis down to up (y axis represents the height of the terrain). Use this function to convert a top-down 2D position to a 3D world position. Note: (0,0) is in the center of the map.

Parameters

  • xposRealrequired
  • zposRealrequired
  • yposRealrequired

Returns

Position

Source

Declared in the game's script sources at:

scar/scarutil.scar