Next: , Previous: , Up: Motion   [Contents][Index]


12.21 Stick To Ground

Component: StickToGround

This component causes objects (such as buildings) to snap to the object underneath using a raycast. It works by raycasting down from the origin of this object, and snaps that origin to the first collider it hits.

Field of StickToGround: bool onStart

Should we do this as soon as we spawn?

Default value: true

Field of StickToGround: bool everyFrame

Should we do this constantly?

Default value: true

Field of StickToGround: bool autoParent

Should we automatically parent to the object we snap to?

Default value: false

Message on StickToGround: Adhere ()

Immediately snaps this object to what ever is below, based on the settings above.

Field of StickToGround: bool onStart

Should we do this as soon as we spawn?

Default value: true

Field of StickToGround: bool everyFrame

Should we do this constantly?

Default value: true

Field of StickToGround: bool autoParent

Should we automatically parent to the object we snap to?

Default value: false

Message on StickToGround: Adhere ()

Immediately snaps this object to what ever is below, based on the settings above.