self:set_sync_to_physics
Client
Sets whether the animatable body synchronizes its motion to the physics step — enable this when moving it every frame from a script so it correctly pushes and carries other bodies
Syntax
local status = self:set_sync_to_physics(
state
)Parameters
| Type | Name | Description |
|---|---|---|
bool | state | true to enable sync to physics, false to disable |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = physics.animatable.create()
entity:set_sync_to_physics(true)