View Single Post
  #2  
Old 07-14-2009, 03:13 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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.
Reply With Quote