Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: leafy on January 20, 2011, 02:35:27 am
-
How would you go about programming linear momentum in the x axis? for instance starting slow then easing into fast and when you stop pressing the arrow keys it takes a while to stop.
-
I have an example of this.
It uses GDB1XS (I think) for the X speed. I used data for everything. Very few actual vars used.
Feel free to modify, but please give me credit.
-
Basically you'd have a velocity and a change-in-velocity variable. Every frame velocity is increased by the change in velocity. Pressing keys would increase the change in velocity, and if no keys are pressed and the velocity is not 0, the velocity would decrease.
Or something like that (note: I didn't look at Binder News' program yet :P)
-
@Binder News could you document your code? I don't fully get what some of it means.
Or you could just explain what it means or something.