Using physics
Posted: Mon Dec 01, 2008 1:49 am
Hello, well, I've got an idea for a game so I'm going to try to make it
I have come across a problem though, relating to the physics.
You can say the game is sort of 'top-down' view, so I don't need gravity.
There are two 'circles' controlled by players.
I want each dot to have a continuous forward velocity, that velocity doesn't change. However, the player can change the angle of the velocity by pressing left/right arrow keys.
How can I code this angle change?
I've tried experimenting, and setAngle doesn't change anything. setSpin affects the angle after a collision, but nothing affecting the direction of velocity itself.
I have a feeling it might have to do with 'impulse', force or 'torque'. I don't know what they are
I have come across a problem though, relating to the physics.
You can say the game is sort of 'top-down' view, so I don't need gravity.
There are two 'circles' controlled by players.
I want each dot to have a continuous forward velocity, that velocity doesn't change. However, the player can change the angle of the velocity by pressing left/right arrow keys.
How can I code this angle change?
I've tried experimenting, and setAngle doesn't change anything. setSpin affects the angle after a collision, but nothing affecting the direction of velocity itself.
I have a feeling it might have to do with 'impulse', force or 'torque'. I don't know what they are