where the arguments for get_noise_2d come from?

Miguel Plazas

I was wondering if you had a methodology coming up with the arguments for calling get_noise_2d for the random_direction vector. or how you got to those specific parameters. 

_noise.get_noise_2d(time_elapsed, time_elapsed * 3.0),
_noise.get_noise_2d(time_elapsed * 2.0, time_elapsed)

I understand the reasoning for randomize the samples, just that it seems somewhat arbitrary 


1 love
  • Nathan Lovato replied

    It is completely arbitrary, yes. We just want our samples to be different so that the shake feels random. But the animation should be continuous and smooth. Using the time value ensures continuity in the sampling, and arbitrary multipliers help us make each axis of motion feel separate.

    All that matters, at the end of the day, is the visual result when playing the game. The values and arguments you use can be whatever works.

    2 loves