All Questions



Delta and Stomp impulse

Hello, thank you for the course, it's really great. One little question, why this time we aren't multiply the stomp impulse by the delta time of the physics process while we are doing it with the gravity ? Bye !
  • Nathan Lovato replied

    That is because we want to add an impulse to the velocity, that is to say, add a vertical speed (that is already in the same units as velocity, pixels by seconds), while before we wanted to integrate an acceleration (in pixels by seconds by seconds).

    To add two values together, you need them to be sharing the same units. In the case of an acceleration, you need to multiply it by a time value to turn it into a velocity: in the case of previous lessons, it becomes an added velocity on a given frame.

  • T
    Erjaeger replied

    Oh okay, I think I understand, thank you !