Page tree

Versions Compared

Key

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

...


Introduced in

Version:1.18

Description

Description:Adjusts the slope (and position) of the object to follow the underlying terrain contour.

Syntax

Syntax:placeOnSurface object
Parameters:
  • object: Object - Object to align / move. The object is only aligned with the the surfaceNormal, but not moved vertically, to be on top of that surface (to do so, use the Alternative Syntax).
Return Value:Nothing

Alternative Syntax

Syntax:placeOnSurface [object, move, considerSnow, smartPlacing] (V3.3+)
Parameters:
  • object: Object - Object to align / move.
  • move: Boolean - If true, then the object is placed on top of the underlying terrain.
  • considerSnow: Boolean - If true, then the alignment takes into account any slopes created by snow layers.
  • smartPlacing: Boolean - (optional) If true the orientation will be determined based on terrain below land contact points and object is elevated to avoid collision with surface (including water). Default value is false. (V20.1.5+)
Return Value:Nothing

Examples

Examples:
placeOnSurface tank1
placeOnSurface [tank1, true, true]

placeOnSurface [tank1, true, true, true] // Will attempt to avoid any collision with surface

Additional Information

See also:fn vbs placeOnSurface
Multiplayer:
Problems:Placement (using alternative syntax) on elevated roadways (for example, bridges, rooftops) may not be applied correctly.

Notes

Smart placing option is more computationally expensive, but helps larger vehicles which might get placed under terrain with the regular one.