View Single Post
  #3  
Old 01-13-2012, 07:40 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You have it backwards by the looks of it, switch Controller with Pointer and the modifications you add/subtract.

Here's an example of you can get your direction based on the target (or mouse), and your point of reference (yourself).

I.e: player.dir = getdir(target.x - player.x, target.y - player.y);
__________________
Quote:
Reply With Quote