View Single Post
  #11  
Old 10-15-2008, 04:57 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
The examples posted above do not do exactly the same thing, but if conciseness translated well to efficiency, then
PHP Code:
temp.= {keydown(3)-keydown(1),keydown(2)-keydown(0)} 
gives the proper velocity vector, or
PHP Code:
temp.vectornormalize({keydown(3)-keydown(1),keydown(2)-keydown(0),0}).subarray(0,2
for consistent velocity in all directions.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote