Hammer force .. Help!

adlaimadlaim Member Posts: 68
Hi ,
My English is bad ..

The image explain you what I mean ..

How to make this in GS ?


http://www.im31.gulfup.com/yPbbp.jpg

Comments

  • adlaimadlaim Member Posts: 68
    How do I calculate the speed of the hammer if touched the podium ?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    maybe track the velocity of the hammer when it hits the podium?
  • adlaimadlaim Member Posts: 68
    @jonmulcahy. How !!
  • FajlajpFajlajp Member Posts: 666
    edited June 2013
    I would find the impact speed.

    Create game.attribute(index) called HammerSpeed
    In the hammer actor do like this
    -Constrain game.HammerSpeed to magnitude(self.motion.linearvelocity.x,self.motion.linearvelocity.y
    In the podium actor do like this
    -Create a a self.attribute(index) and call it HammerImpactSpeed
    -Create a rule that says if actor overlaps or collide with actor podium
    change attribute self.HammerImpactSpeed to game.HammerSpeed

    Hope it helped
    //Fajlajp
  • adlaimadlaim Member Posts: 68
    @fajlajp that's not work .. :(
  • FajlajpFajlajp Member Posts: 666
    I Will make a demo for you:)
  • FajlajpFajlajp Member Posts: 666
    edited June 2013
  • adlaimadlaim Member Posts: 68
    @fajlajp Thanks :)

    but i want to make hammer follow my touch on the screen ..

    and calculate speed when touch the podium ..

    Thanks again :)
  • FajlajpFajlajp Member Posts: 666
    Here is how to make you actor follow you finger(when it´s down)

    -When touch is pressed
    Constrain attribute self.position.x to mouse.position.x
    Constrain attribute self.position.y to mouse.position.y

    And it calculate the speed when it touch the podium... It´s just that the hammer have not a regular collision shape.

  • adlaimadlaim Member Posts: 68
    Thank's @fajlajp
Sign In or Register to comment.