Results 1 to 2 of 2

Thread: How to move an object using the arrow keys

  1. #1
    Guest

    How to move an object using the arrow keys

    I am trying to move an object in the direction it is pointing, which happens to be an asteroid, around the screen using the arrow keys. I am using translation and rotaion to do this. ( I believe there is some math involved here, the direction times the speed, then translate to that value.)

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    477

    Re: How to move an object using the arrow keys

    if (keys[VK_UP]) Move Forward ...
    if (keys[VK_DOWN]) Move backward ...

Similar Threads

  1. Arrow keys
    By BertusDries in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-07-2011, 11:35 PM
  2. Using Arrow keys in OpenGL
    By akya in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-04-2005, 04:31 PM
  3. arrow keys function
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-04-2005, 11:18 PM
  4. How to use arrow keys
    By ltrain_riders in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 12-04-2002, 02:45 PM
  5. ASCII values for arrow keys
    By Eclipix in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-02-2002, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean