Link Search Menu Expand Document

PhysX Material

Controls physics properties for individual shapes or rigid bodies. Can be set on an entity with physx-body or on shapes contained within it. Requires scene-options: physics.

PhysX Material Attributes

Attribute Type Default Description Required
staticFriction number 0.2 Static friction applied when objects are not moving relative to each other. No
dynamicFriction number 0.2 Dynamic friction applied when objects are moving relative to each other. No
restitution number 0.2 Restitution, or ‘bounciness’ of the material. No
density number   Density for the shape. If specified for all shapes in a rigid body, mass properties will be automatically calculated based on densities. No
collisionLayers array [1] Which collision layers this shape is present on. No
collidesWithLayers array [1, 2, 3, 4] Array containing all layers that this shape should collide with. No
collisionGroup number 0 If greater than 0, this shape will not collide with any other shape with the same collisionGroup value. No
contactOffset string   If >= 0, sets the PhysX contact offset, indicating how far away from the shape simulation contact events should begin. No
restOffset string   If >= 0, sets the PhysX rest offset. No