Making a cannon that shoots balls (a actor)

samircalviniyersamircalviniyer Member Posts: 16
edited November -1 in Working with GS (Mac)
Dear Gamesalad ,
I found many cannon templates however all of them are based around time:
- The longer you click, the further the ball is shot.

How can you change the cannon to shoot further depending on how far you click from the cannon. So:
- The further you click, the further the arrow becomes that shows where you are shooting the ball and how hard you are shooting it.

What Attributes and codes do I need to make the basic picture?

Thanks in advance.

Comments

  • arcticsunrisearcticsunrise Member Posts: 159
    those templates you mention rks dont come with the GS download as standard

    there is a video from tshirtbooth on the cookbook youtube that shows howto set up a custom attribute called power and base it on the distance of the touch input from the cannon.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    arcticsunrise said:
    those templates you mention rks dont come with the GS download as standard

    there is a video from tshirtbooth on the cookbook youtube that shows howto set up a custom attribute called power and base it on the distance of the touch input from the cannon.

    Yes they do come with the gs download as standard. Search for them in the new section of the gs creator to open the projects.

    cheers
  • mlaftamlafta Member Posts: 147
    You can substitute the time-based power variable with a variable that depends on the mouse position

    I think the behavior is called magnitude (mouse position x - reference, mouse position Y - reference Y)

    So depends on the magnitude you can throw the ball higher or however you like it.

    ML

    http://itunes.apple.com/ca/app/basketball-starz/id454675752?mt=8
  • arcticsunrisearcticsunrise Member Posts: 159
    JohnPapiomitis said:
    Yes they do come with the gs download as standard. Search for them in the new section of the gs creator to open the projects.

    cheers

    my total bad

    i just saw that when you login and go to new it downloads them so you have them! ta for the tip
Sign In or Register to comment.