Moving shapes Using Keyboard
-
- Posts: 2
- Joined: Mon Jul 13, 2009 5:24 am
- Contact:
Moving shapes Using Keyboard
Just I want to update the velocity of any shape if i press the left/right arrow key. Suppose, initially,the velocity of any shape is 0, if I press left key the velocity will be 200. How can I do this? please suggest me. Do I use cpUpdateVelocity or anotherway?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Moving shapes Using Keyboard
Code: Select all
body.v = cpv(vx, vy);
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 4 guests