Thumbstick to control actor arm movement?

CreeperWareCreeperWare Member Posts: 43
edited November -1 in Working with GS (Mac)
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!

Comments

  • CreeperWareCreeperWare Member Posts: 43
    To clarify, unlike the game linked above, I would actually like the arm to rotate on a fixed position, instead of around the actor's body.
  • CreeperWareCreeperWare Member Posts: 43
    Got it working using TSB's wonderful tutorial on orbiting an object around another!

    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.
Sign In or Register to comment.