Creating and Adjusting Physics Materials!

addam davis
3 min readMay 30, 2024

Objective: Create physics materials to give you interactable objects a more realistic feel.

While creating grabbable objects we are given the opportunity to create physics materials. Physics Materials are materials that defines properties on the collider’s surface.

Selecting the Physics material the inspector gives us some options to explore and fine tune the material.

Dynamic Frictions: determines the friction this collider’s surface has against another collider when they move/slide against each other. This value is between 0 and 1, a zero would be no friction (like ice) and a 1 would mean high friction (like rubber)

Static Friction: determines how much friction this collider’s surface has against another collider when the colliders are not moving.

Bounciness: Determines how bouncy the surface is, and how much other colliders can bounce off it. 0 is not bouncy and other colliders lose kinetic energy upon hitting it. 1, the surface is very bouncy, and the other colliders bounce without any loss of kinetic energy.

Friction Combine: Define how the physics system calculates friction between two colliders, based on each collider’s friction. This selection applies to both dynamic friction and static friction.

Bounce Combine: Define how the physics system calculates bounce between two colliders, based on each collider’s bounciness value.

In this example I will be creating a physics material for a basketball to give the ball a more realistic feel in VR. To begin we need to attach the material to the gameobject. We can do this in the collider component.

For a basketball I would crank up the bounciness to 1. This will give you a satisfying bounce when throwing the ball in VR.

Next, we have a basketball, and we want to throw this at a basketball hoop eventually. Well to give your throw a better feel we have an option in the XR Grab Interactable that will do just that. We can manipulate the ‘Throw Velocity Scale’ By default it is set to 1.5 and I want to raise it to 3.

Now that feels like a basketball! You can further tweak these setting for a different ball if you so desired. Say you want to throw a tennis ball. Lower the mass on the rigidbody, raise the throw velocity scale and boom, you have a physics accurate tennis ball. Don’t be afraid to experiment with your Physic Material and I’ll see you in the next tutorial!

--

--