jimmynewguy wrote:Anyway to make this dog animation look...better?
char * key = GetKeyState(); // find key states
int LR = key[KEY_RIGHT] - key[KEY_LEFT]; // 1 = right -1 = left 0 = left & right or neither
xvelocity = max(-3, min(xvelocity + 0.5 * LR, 3)) * (1 - 0.1 * (!LR)); // limit the speed to 3
// pixels/frame, acceleration is 0.5
// if we are not moving aka (!LR) then we multiply the movement by .9 so it slowly goes down but otherwise it is multiplied by
// 1 or does not change
// with this the movement will never really stop, just get slower and slower so we can fix that with the next lines
if(abs(xvelocity) < 0.25)
xvelocity = 0;
Hblade wrote:lol epic
jimmynewguy: And gogo, its a dog!!
Camper1995 wrote:It's a Black Fox
jimmynewguy wrote:Does anyone have any ideas or requests they would like to see?
Users browsing this forum: No registered users and 1 guest