View Single Post
  #3  
Old 11-23-2004, 03:22 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
My car is 8 tiles by 11 tiles at direction 0, and the equation I tried was:

PHP Code:
dx = (x+(8+vecx(prevdir)*3)/2) - playerx;
dy = (y+(8+vecy(prevdir)*3)/2) - playery;
playerx = (x+(8+vecx(dir)*3)/2) + dy vecy(dir)*3;
playery = (y+(8+vecy(dir)*3)/2) + dx vecx(dir)*3
It works for directions 0 and 1, (which is probably just a coincidence) but the rest it throws the player off to some other position, sometimes not even in the car
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote