Animatable Body
self:set_constant_angular_velocity
SharedSets the constant angular velocity the animatable body applies to bodies resting on it
Syntax
local status = self:set_constant_angular_velocity(
velocity
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | velocity | Angular velocity to apply as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = physics.animatable.create()
entity:set_constant_angular_velocity({0, 1, 0})self:set_constant_linear_velocity
Sets the constant linear velocity the animatable body applies to bodies resting on it, such as a conveyor surface
self:set_sync_to_physics
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