Moving a character at a set angle

  1. Say I have an angle 0 to 360. What formula should I use to move the character?

I need to translate the angle to (x,y).
2. What is the best practice to move a character from a top down perspective?

Since there it’s top down, I would not be using gravity from the physics engine. The character is also not standing on any physics body, so there’s no friction to slow him down. [import]uid: 75783 topic_id: 13029 reply_id: 313029[/import]

For set angles, look at the joystick demo code.

For moving a non physics object at set speeds, check out the D pad tutorial on Techority - it covers that nicely :slight_smile: (You can even speed up for powerups or boosts and then go back to regular speed if you wish.)

Peach :slight_smile: [import]uid: 52491 topic_id: 13029 reply_id: 47841[/import]

Hi,

I am using the joystick code of which an angle is returned, but I am still trying to figure out how to use that angle to move the character in the direction of that angle.

Trying to figure this out: http://gameprogrammingtutorials.blogspot.com/2009/11/vectors-part-two.html

By using onEnterFrame as shown by your dpad example the speed would be dependent on the frame rate. Do the different devices have a somewhat close frame rate? [import]uid: 75783 topic_id: 13029 reply_id: 47845[/import]

Oh well figured it out :smiley: [import]uid: 75783 topic_id: 13029 reply_id: 47848[/import]

Can you post your solution? [import]uid: 19626 topic_id: 13029 reply_id: 47875[/import]

You should post your solution [import]uid: 79135 topic_id: 13029 reply_id: 53709[/import]