
07-14-2009, 03:13 AM
|
|
Will work for food. Maybe
|
 |
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
|
|
|
A common technique to 'close the gap' is usually running a loop like such :
for (temp.i=0;i<playerspeed;i+=1/16)
Then checking for an onwall from the player plus the vecx/y of the player's direction * i. If there is a wall, break the loop and add playerx += vecx(playerdir)*i and so on. |
|
|
|