self:set_physics_material
Client
Applies a physics material to the animatable body, controlling friction and bounce behavior
Syntax
local status = self:set_physics_material(
friction,
bounce,
rough = false,
absorbent = false
)Parameters
| Type | Name | Description |
|---|---|---|
float | friction | Friction coefficient to apply |
float | bounce | Bounce (restitution) coefficient to apply |
bool | rough | Whether friction combining should favor the rougher surface |
bool | absorbent | Whether bounce combining should favor the less bouncy surface |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = physics.animatable.create()
entity:set_physics_material(0.5, 0.2)