Jump to content

Tilemap movement


freke1981SWE
 Share

Recommended Posts

I´ve solved it by saving this.time.elapsed into a movement timer and checking the value against a threshold in the update loop:

 

this.currentMovementTimer += this.time.elapsed;

 

if (this.currentMovementTimer > this.intSpeed) {
this.currentMovementTimer = 0;
 
By lowering the intSpeed I also can adjust the choppy movement.
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...