Hi there,
Not at my developing computer at the moment, but been mentally calculating how to solve this problem and failing : -)
The problem: move a top down spaceship sprite go in the direction of the joystick, whilst incorporating a turn rate.
I am making a 2d space game, I just need to finalise the movement control, I think the keyboard version is fine
but onscreen is being a pain
keyboard: W = forward and A & D for left right,
this mean I can introduce turn rate.
but if this behaviour is duplicated with an onscreen joystick it is awkward as you expect to point the joystick and the ship goes there, so need a way of getting turn rate in there.
So what I need is to determine where the joystick is pointing so I can control my ship accordingly.
I am guessing sin and cos ect will be involved against the joystick x and y data, just wondering if anyone has done this who can point me in the right direction : -)
Thanks everyone!
I seek perfection but wear my scars with pride