[ENGINE ONLY] Footsteps depending on material

Hi guys, would it be possible to play footstep sounds depending on which material the player is walking?
E.g. grass, concrete, sand, snow, water, …

Hi @iso74,

There isn’t a system in the Playcanvas engine to do that automatically. There are several ways to do this, if you are using physics one way is to listen to the contact collision event that returns the entity you’ve collided with.

From there you can use a set of tags or search the model material to add logic that decides the correct sound to play.

Here is a simple tutorial to get started:

https://developer.playcanvas.com/en/tutorials/collision-and-triggers/

2 Likes