Results 1 to 3 of 3

Thread: Car diagonal facing.

  1. #1

    Car diagonal facing.

    hey i made a car, that moves in 8 directions. how do i make it, so if both up and right are pressed the car faces diagonal?

    i got this:

    if(Key.isDown(Key.RIGHT) && (Key.UP)){
    _rotation=45;
    }

    but it doesn't work.
    Click here to read the signature guidelines for the forums.
    Reason: Dimensions > 300x60
    Ready to kick some ***!

  2. #2
    if(Key.isDown(Key.RIGHT) && Key.isDown(Key.UP)){

  3. #3
    This class I released today may or may not help you out. Might be worth a look all the same - it's for quickly and accurately detecting up to 3 simultaneous keypresses in AS3:

    http://www.photonstorm.com/archives/...class-released

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012