Forum rules - please read before posting.

Footsteps sounds in AC 1.81.2

Hi,

I have set up the new footstep sound surfaces in 1.81.2 and although the sound of the footsteps are heard, it only plays the footstep sounds that are defined in the 0:slot in surfaces, whichever surface the player is walking on.

https://imgur.com/a/mVxvgxO

The result is the same with both mesh colliders and box colliders.

// Magnus

Comments

  • edited June 2024

    This may be a raycasting issue. Configure the Footstep Sounds component's Layer mask field to match that of the ground colliders it should be detecting.

  • Thanks. I tried both "everything" and the various individual layers of the ground objects but still the same.

  • Recreated, thanks.

    It's down to Raycasting coming from the component's GameObject (in this case, the first-person camera) as opposed to the character's position.

    I'll amend this, but in the meantime you can get by with raising the Ray length to 5.

  • Thanks, but still doesn't work :-(
    I put a

    Debug.DrawRay(transform.position, Vector3.up * -raycastLength, Color.red, 2f);
    

    in the Request Surface method and the rays are cast just fine, but still the sound is just Surface ID (0)...

  • It's working on my end - try moving the Footstep Sounds component to the root object. If sounds are being played automatically, it doesn't need to be on the same object as your Animator.

  • Hmm... still doesn't work. I've tried to remake the Physics materials etc. but still the same. Even if I remove all the PhysicsMaterials from the floor colliders, it still plays the Surface ID (0) sound.

  • I found it. It was the layers. I had mistakenly changed it to everything, which included the player itself which returned a null for material. My fault for not checking, but thanks a lot for showing the right direction !!!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.