Hello ,i nead help to play the sound of footstep ,i wrote this code but it looks like it’s playing in a loop .i just want to play the sound one evry the file length
float vertical = Input.GetAxis("Vertical") * movementSpeed *deltaTime;
float horizontal = Input.GetAxis("Horizontal")* turningSpeed *signe*deltaTime;
float jump=jumpForce;
if(vertical!=0||horizontal!=0)
{
mouvement=true;
}
else
{
mouvement=false ;
}
if(mouvement)
{
audio.PlayOneShot(WalkLeftSound);
}