Комментарии:
For all those who don't have such a good result as in the video. I've tried this and I'm happy with it.
public SoundControler SoundControler;
vector3 last position;
// Start is called before the first frame update
void start()
{
}
// Update is called once per frame
void update()
{
Step();
}
void step()
{
vector3 currentposition = lastposition - transform.position;
if (currentPosition.magnitude > 0.9f && !soundControler.IsPlaying)
{
lastPosition = transform.position;
SoundManager.Instance.PlaySound("Step", SoundGroup.Sound);
}
}
You just need to swap out the sound controller and sound manager.
King
Ответитьwhy
Ответитьthanks unity creators, very cool
ОтветитьI tried this and it didnt work, please help
Ответитьwhat do you mean by source code available soon x)
ОтветитьI hate these videos without commentary.
Ответитьi did what u did but its says
Assets\Scripts\PlayerSprint.cs(59,30): error CS1061: 'PlayerFootsteps' does not contain a definition for 'volume' and no accessible extension method 'volume' accepting a first argument of type 'PlayerFootsteps' could be found (are you missing a using directive or an assembly reference?)
could you please post the script for the footsteps?
Ответитьcan you post the code?
ОтветитьDo I still have to put sprint distance if I don’t have sprinting in my game?
ОтветитьThanks so much, great video
Ответитьthanks bro
Ответить