sm.debris.createDebris
Create visual debris of a shape from its uuid, that collides with world objects but does not have an impact on them.
Kind: Function
Environments: Game
Game
sm.debris.createDebris(
uuid,
position,
rotation,
velocity,
angularVelocity,
color,
timeToLive,
gravity,
friction,
linearDamping,
angularDamping,
time
)
Availability: Client only
Parameters:
| Name | Type | Description |
|---|---|---|
uuid |
Uuid | The uuid of the shape. |
position |
Vec3 | The position. |
rotation |
Quat | The rotation. |
velocity (optional) |
Vec3 | The linear velocity. (Defaults to zero) |
angularVelocity (optional) |
Vec3 | The angular velocity in radians per second around the axes (x,y,z). (Defaults to zero) |
color (optional) |
Color | The color. (Defaults to the shape's default color) |
timeToLive (optional) |
number | Time to live. (Defaults to 10) |
gravity (optional) |
number | Gravity vector. (Defaults to { 0,0,-10 }) |
friction (optional) |
number | Amount of friction. (Defaults to 1) |
linearDamping (optional) |
number | Amount of linear damping. (Defaults to 0.3) |
angularDamping (optional) |
number | Amount of angular damping. (Defaults to 0.3) |
time (optional) |
number | The time the debris will be simulated before disappearing. (Defaults to 10 seconds) |