How to I define the starting point and ending point in the arc using Tshirt Booth's tutorial?

ammansabetammansabet Member Posts: 4
edited July 2012 in Working with GS (Mac)
http://gshelper.com/orbit-around-a-point-or-actor-in-gamesalad/

I am trying to translate this tutorial into a zelda-style sword swinging in an arc around a central point. What I can't figure out is how to set the starting point where the sword begins its swing. I suspect that "self.time" is the suspect operator here but I can't seem to get the motion to work correctly. The tutorial gets it rotating, but doesn't explain where to actually start the rotation. Can someone help me with this?

Best Answer

  • RThurmanRThurman Posts: 2,881
    edited July 2012 Accepted Answer
    OK -- I see now. (I was thinking of side view. Not birds eye.) It is technically the same (as you say). But you also need to take into consideration that the whole arm becomes part of the sword. The pivot point becomes the shoulder -- not the sword hilt. Does that help?

    Here is a demo for pinball flippers. It can be modified into a sword (with arm). It might help.
    http://www.mediafire.com/download.php?n7ndp4npbk48b3p

Answers

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    It might be easier to use the "Rotate To Angle" behavior.
    1) draw the sword so that it points to the "0" angle (----->)
    2) in GS point the sword actor straight up with a Change Attribute Behavior (90 degrees).
    3) When (mousedown or whatever the trigger)
    ----Rotate To Angle (0) Relative to (scene) Speed (300)
    --Otherwise
    ----Rotate To Angle (90) Relative to (scene) Speed (300)
  • ammansabetammansabet Member Posts: 4
    While that does technically work, what you describe works for a character who only faces a limited number of angles. I have a character who moves in 360 degrees (birds eye view). This means if he is swinging his sword with his right hand, it has to start from whatever angle his right side is and orbit around past his front. That's why I thought using this orbit tutorial would be helpful.
Sign In or Register to comment.