Thumbstick to control actor arm movement?
Hi all,
My game has been in development for a while now, but I want to make a change in the control style to make it more intuitive.
I currently have a D-pad controlling Left / Right movement of the actor, and then the up / down buttons on the D-pad increment his gun position up or down in 45 degree increments.
Instead of this, I want to have a secondary control stick, a analog control stick (like the one from the pre-made template) control his gun angle.
To give you an idea, it should behave like this game, but with the thumbstick controlling his gun instead of the mouse: http://www.newgrounds.com/portal/view/118826
I understand that you need to spawn the gun / arm on top of the player actor, but how would I go about making the thumbstick control the angle of his arm / gun?
Thank you so much in advance!
My game has been in development for a while now, but I want to make a change in the control style to make it more intuitive.
I currently have a D-pad controlling Left / Right movement of the actor, and then the up / down buttons on the D-pad increment his gun position up or down in 45 degree increments.
Instead of this, I want to have a secondary control stick, a analog control stick (like the one from the pre-made template) control his gun angle.
To give you an idea, it should behave like this game, but with the thumbstick controlling his gun instead of the mouse: http://www.newgrounds.com/portal/view/118826
I understand that you need to spawn the gun / arm on top of the player actor, but how would I go about making the thumbstick control the angle of his arm / gun?
Thank you so much in advance!
Comments
Just use the Game Angle 1 attribute (from the gamesalad joystick template) for the rotation of the character's gun / arm , and add 180 degrees if you want the arm / gun to rotate appropriately if the character changes direction.