Skip to main content

Type Alias: 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:647

Physical surface properties used for contact: friction, restitution, optional contact modification, and trigger mode.

Properties

staticFriction

staticFriction: Float;

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:652

Static friction coefficient (typically 0..1). 0 feels like ice; higher resists start of motion. Effective value is averaged with the other surface.

Default Value

0.5;

dynamicFriction

dynamicFriction: Float;

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:657

Dynamic (kinetic) friction coefficient (typically 0..1). If greater than staticFriction, staticFriction is clamped up to match. Effective value is averaged with the other surface.

Default Value

0.5;

restitution

restitution: Float;

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:662

Restitution (bounciness) in [0,1]. 0 = no bounce; 1 = perfectly elastic. Effective value is averaged with the other surface.

Default Value

0;

contactVelocity

contactVelocity: Vec3;

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:667

Applied contact velocity offset when colliding (m/s). Only used if modifyContact is true.

Default Value

(0, 0, 0);

modifyContact

modifyContact: boolean;

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:672

Enable contact modification (applies contactVelocity on collisions).

Default Value

false;

isTrigger

isTrigger: boolean;

Defined in: node_modules/@3dverse/livelink.core/dist/_prebuild/engine_types/components.d.ts:677

Treat associated geometry as a trigger (generates events but no physical response).

Default Value

false;