Those two words are known by everyone, however, who can think about formulas without googling ? lol. Only a few people ^^
So after a look on wiki, I got my functions ready:
Then, I thought: "How am I supposed to make shit move?"
It's simple, put a constant acceleration, and then control maximum velocity !
Sounds easy, but a lot of work ^_^
However, these functions are messed up:
- Sprite goes right, ok
- Sprite wants to go left (xa < 0, but xv still > 0)
- So new xv will have (newxa * dt) + positivexv.
This means, our sprite will decelerate (not bad indeed). But this looks more like a slide effect
So I didn't coded a good moving engine, I just figured out how "Mickael Jackson : The Experience"'s moonwalk engine has been coded
Aucun commentaire:
Enregistrer un commentaire