Hi all,
The concept of what I'm after is pretty simple, but I'm struggling implementing it. I guess I need to read up on how cos / tan / sin etc really works mathematically.
Anyhow, what I'm after, is for a simple sprite / icon to rotate in a circular motion (let's say the centre of a 1024x768 screen would be the centre point. Then, when the user hits a key (spacebar) the icon stops moving in a circular fashion, but then moves from the point where it was stopped to the centre of the 'circle' (screen) and back out again until the user hits another key.
You might be able to gather from this that I'm working on a darts-type game (not regular darts!)
I won't post any code yet, because I've been through so many variations of trial and error, it'd almost be pointless! :)
Any help would be greatfully received.
The concept of what I'm after is pretty simple, but I'm struggling implementing it. I guess I need to read up on how cos / tan / sin etc really works mathematically.
Anyhow, what I'm after, is for a simple sprite / icon to rotate in a circular motion (let's say the centre of a 1024x768 screen would be the centre point. Then, when the user hits a key (spacebar) the icon stops moving in a circular fashion, but then moves from the point where it was stopped to the centre of the 'circle' (screen) and back out again until the user hits another key.
You might be able to gather from this that I'm working on a darts-type game (not regular darts!)
I won't post any code yet, because I've been through so many variations of trial and error, it'd almost be pointless! :)
Any help would be greatfully received.