Punching bag effect???

LordTarantorLordTarantor Member, PRO Posts: 890
edited November -1 in Working with GS (Mac)
Hey everybody:
I am trying to create this effect. Imaging you punch a punching bag like a boxer do. The punching bag will swing a little. How could I recreate that effect in GS. Like if I have an image which for example is 2wide by 8height. The height is divided 6 of punching bag and 2 of chain.

Comments

  • LordTarantorLordTarantor Member, PRO Posts: 890
    any one?
  • RedlerTechRedlerTech Member Posts: 1,583
    well, you could make a rule:

    When bag collides with actor:
    rotate to random(110, 270)

    Or if you want to get technical create an attribute called powerofspeed. Inside the boxer hand. Constrain attribute game.powerofspeed to magnitude(self.linearvelocity.X,self.linearvelocity.Y)

    also constrain it to a min of 1 & a max of 180

    go into the bag

    Rule:
    when overlaps/collides with hand interpolate rotation to game.powerofspeed

    Rule when self.rotation = game.powerofspeed interpolate self.rotation to 0

    _________________________________________________
    Full Game Creation Service
    1 On 1 Project Help
    1 on 1 GameSalad Tutoring
  • LordTarantorLordTarantor Member, PRO Posts: 890
    nextgen I will try that right no, thanks a lot.
  • RedlerTechRedlerTech Member Posts: 1,583
    No problem :D I didn't try it, just like thought of it.

    Tell me how it goes,
    Matt
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Ok Matt, thanks a lot but its not working. Its moving like in a fan motion instead of swinging. I need a 2 by 8 that will be hanging to stay in one place on the top but the bottom part swing like from 240 to 320 and swing to or three time, every time a little less until the 3rd or 4th swing when it will stop
  • RedlerTechRedlerTech Member Posts: 1,583
    EDIT: Sorry, I wasn't thinking. This will method not depend on the hit. I will rewrite it now sorry
  • RedlerTechRedlerTech Member Posts: 1,583
    @LordTarantor this is very difficult to explain over the forums, if you'd like you can send your project over & I'll take a look for free.

    Matt
  • LordTarantorLordTarantor Member, PRO Posts: 890
    No it didn't work. What is the swing attribute created for?
    It keeps rotating from the center instead of from the top.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I made this demo a while ago, maybe it can help?

    http://gamesalad.com/game/2873
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Omg Firemaplegames, that is awesome, thanks a lot that is exactly what I am looking for.
Sign In or Register to comment.