Guides Physics 3D Create a 3D Physics Material in the Editor

Physics 3D 2 min read Updated Aug 2026

Create a 3D Physics Material in the Editor

Use a 3D physics material when a collider needs a surface feel: slippery, sticky, heavy, springy, or somewhere in between.

Create the Asset

In the Assets panel:

  1. Right-click the folder where you keep physics assets.
  2. Choose Create > Physics Material 3D.
  3. Name the asset for the surface behavior, such as RubberBall, IceRamp, or StoneFloor.

Select the asset to edit its values in the Inspector.

Tune the Surface

Start with these fields:

  • Dynamic Friction: how much moving contact resists sliding.
  • Static Friction: how much resting contact resists starting to slide.
  • Bounciness: how much velocity is preserved after impact.
  • Friction Combine: how this material combines friction with the other collider's material.
  • Bounce Combine: how this material combines bounciness with the other collider's material.

A rubber ball usually has lower friction and higher bounciness. A stone floor usually has moderate friction and low bounciness. Ice usually has very low friction.

Assign It To a Collider

Select a GameObject with a 3D collider.

In the collider card, set Material to your Physics Material 3D asset.

The supported 3D collider components are:

  • BoxCollider3D
  • SphereCollider3D
  • CapsuleCollider3D
  • CylinderCollider3D
  • MeshCollider3D

Press Play and test the result. If the behavior is too strong, tune the material asset instead of editing each collider separately.

Use It From Code

You can assign a material asset path when the collider should switch surfaces at runtime.

use Lenga\Engine\Core\Behaviour;
use Lenga\Engine\Core\SphereCollider3D;

final class BallSurface extends Behaviour
{
    public function start(): void
    {
        $collider = $this->getComponent(SphereCollider3D::class);
        $collider->materialPath = 'Assets/Physics/RubberBall.physics-material3d.json';
    }
}

For most authored scenes, use the Inspector field. Use code when the gameplay intentionally changes the material during play.