Skip to main content

Contact Velocity

Contact velocity refers to the relative velocity between two colliding physics bodies at their contact point.

This is calculated by the physics engine by default, but it can be overridden using the modifyContact and contactVelocity attributes in the

Physics Material
component. This can be used to simulate platforms which impart velocity to objects standing on them, such as conveyor belts.

Physics Material Component In Conveyor Belt Setting
Take notice of contactVelocity and modifyContact in the physics material component.

Physics Material

physics_material

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

Requires one of

Schema

contactVelocity

Vector3(m/s)

Default:[0,0,0]

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

dynamicFriction

Float

Default:0.5

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.

isTrigger

Boolean

Default:false

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

modifyContact

Boolean

Default:false

Enable contact modification (applies contactVelocity on collisions).

restitution

Float

Default:0

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

staticFriction

Float

Default:0.5

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

To enable contactVelocity set modifyContact to true.

Then, contactVelocity will be used as the target relative velocity for the contact points between this physics body and all other bodies colliding with it, rather than letting natural physics determine the outcome.

In the case of a conveyor belt, contactVelocity allows objects on the conveyor belt surface to move as if the surface itself is moving at a constant speed, regardless of the objects' natural tendency to come to rest due to friction.