R3d.Body:setIsAllowedToSleep

From GiderosMobile
Revision as of 10:58, 18 December 2025 by MoKaLux (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2019.10
Class: R3d.Body

Description

Allows or disallows a body to sleep.

r3d.Body:setIsAllowedToSleep(allowed)

The sleeping technique is used to disable the simulation of resting bodies. By default, the bodies are allowed to sleep when they come to rest.

Parameters

allowed: (boolean) either true or false, default true

Example

// This rigid body cannot sleep
ship.body:setIsAllowedToSleep(false)