THROW & SCALE

PeeCeePeeCee Member Posts: 107
edited November -1 in Working with GS (Mac)
HI.

Anyone know a good tutorial on a swipe gesture to throw something and have it scale in size when its thrown.

something generic to start would be a good start.

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I dont know of any but the best way to find more demos than most people know of is to open GameSalad click new and then in the search box search for terms relating to the type of demo you want. swipe, flick, throw, etc...
  • JamieOneilJamieOneil Member Posts: 877
    For the swipe -


    And to make it scale in size i would add in a rule that when it is thrown, interpolate self.size to 'what you want'.

    JamieOneil
  • PeeCeePeeCee Member Posts: 107
    thanks guys for that info. ive actually got swipes sorted but i figured i needed to get into detecting distance etc after a throw is done so i can decide when to scale. i guess the question is how is throw distance or throw velocity is setup and detected so i can work on image scale.

    any help would bee appreciated
  • JamieOneilJamieOneil Member Posts: 877
    pcbuddyc said:
    thanks guys for that info. ive actually got swipes sorted but i figured i needed to get into detecting distance etc after a throw is done so i can decide when to scale. i guess the question is how is throw distance or throw velocity is setup and detected so i can work on image scale.

    any help would bee appreciated

    hmm, try this. you might hae to tweek the numbers. And depending on where you flick across (X) or up (Y) you may have to chnge the 'linear.velocity.X' to 'linear.velocity.Y'

    When 'self.Motion.Linear Velocity.X > 250
    Interpolate - self.Size.Height to 34 (duration 1)
    Interpolate - self.Size.Width to 34 (duration 1)

    When 'self.Motion.Linear Velocity.X > 150
    Interpolate - self.Size.Height to 29 (duration 1)
    Interpolate - self.Size.Width to 29 (duration 1)

    When 'self.Motion.Linear Velocity.X > 50
    Interpolate - self.Size.Height to 45 (duration 1)
    Interpolate - self.Size.Width to 45 (duration 1)

    Tweek the numbers depending on the size of your actor, iPhone/iPad, and what the Linear Velocity.
    If that doesn't work, could you please tell me more about the app so i can get a better idea ?

    JamieOneil
  • PeeCeePeeCee Member Posts: 107
    wow go jamie!!!!!. just the start i needed.
    and yes my good friend i'd be more than happy to come back to you on this.

    again appreicate the psuedo to get me started and yes at this point it will by up flicks that i want so im guessing " .y " is what i'll start with.

    excellent work and a great reply my friend.

    touch base soon pal and i hope your the one to read my reply when i hit back soon
  • PeeCeePeeCee Member Posts: 107
    ok jamie good friend.
    things are working except they are not :).

    ok so just to break it down for you. all i want to do is have a ball (using swipe gesture) flicked in a direction to land or go through a basket ball hoop.
    As i said,I've got the swipe thing in business but i need to work out how to calculate (i guess) the swipe distance to then pass out over to (as you quite rightly said) the interpolation for image scaling.

    awaiting your further guru guidance.
  • JamieOneilJamieOneil Member Posts: 877
    I will start making a basic template for it, and I will send you the link.
    It won't take long.

    There is a paper toss template by stormystudio, that's something you should look at, but that costs.
  • PeeCeePeeCee Member Posts: 107
    Thankyou Jamie. I wait your reply my good friend

    Cheers
Sign In or Register to comment.