PhysicsMaterial
type PhysicsMaterial = {
staticFriction: Float;
dynamicFriction: Float;
restitution: Float;
contactVelocity: Vec3;
modifyContact: boolean;
isTrigger: boolean;
};
Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:644
Physics material which represents a set of physical surface properties.
Type declaration
Name | Type | Description |
---|---|---|
staticFriction | Float | The friction coefficient applied between this surface and another surface if they are not moving lateral to each other. Usually a value from 0 to 1. A value of zero feels like ice, a value of 1 will make it very hard to get the object moving. Resulting static friction of a physics body colliding with another is determined by the average of both bodies' static friction coefficient. |
dynamicFriction | Float | The friction coefficient applied between this surface and another surface if they are moving relative to each other. Usually a value from 0 to 1. A value of zero feels like ice, a value of 1 will make it very hard to get the object moving. If set to greater than staticFriction, the effective value of staticFriction will be increased to match. Resulting dynamic friction of a physics body colliding with another is determined by the average of both bodies' dynamic friction coefficient. |
restitution | Float | Restitution coefficient, or bounciness of surface. A coefficient of 0 indicates as little bounce as possible, higher values up to 1.0 result in more bounce. Should be in the range [0,1]. Resulting bounciness of a physics body colliding with another is determined by the average of both bodies' restitution. |
contactVelocity | Vec3 | The velocity applied to the contact between this physics body and another body. Only applies if modifyContact is true. |
modifyContact | boolean | Whether to modify the contact when this physics body collides with another body. |
isTrigger | boolean | Whether to consider the geometry associated to this physics material as a trigger or not. |