ClampToGround

From GECK
Jump to: navigation, search


A function added by the JIP PP LN Plugin.

Description

Moves the calling reference straight down to the nearest floor/collision surface beneath it — identical to pressing F in the GECK render window. Adjusts vertical position only; orientation and X/Y remain unchanged.

Syntax

[help]
reference.ClampToGround

Example

MyMarkerRef.ClampToGround
let createRef := PlayerRef.PlaceAtMe SomeCrateStatic
createRef.ClampToGround

Examples

Drop a newly placed object to the ground
let createRef := PlayerRef.PlaceAtMe SomeCrateStatic
createRef.ClampToGround
Snap an existing marker to the floor beneath it
MyMarkerRef.ClampToGround

Notes

  • Works only on references (not base forms).
  • The object will be moved directly downward until it collides with the floor or terrain below.
  • Rotation/orientation is not modified.

See Also