accelerate after bounce

ShaunEleryShaunElery Member, PRO Posts: 148
I want enemy actors to bounce off my hero's force field. I got them to bounce but they move very slowly. I want them to accelerate in what ever direction they are moving after the bounce. How can I do that?

thank you

Comments

  • gamesfuagamesfua Member Posts: 723
    You can try changing the balls bounciness for starters. Or perhaps have some kind of rule that says when ball collides with forcefield to accelerate x (speed amount).
  • ShaunEleryShaunElery Member, PRO Posts: 148
    No matter what I set the bouncy to the speed stays the same.

    If I accelerate X it only moves in the X dimension. I want it to accelerate in the direction it is already moving in because of the bounce. Is there a way to get the direction of an actor?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Keep the bounce and collision parts but add another rule:

    When actor overlaps or collides with actor of type force-field
    --Timer (after) .01 seconds
    ----Change Velocity
    ------Direction: vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )
    ------Speed: 500
  • ShaunEleryShaunElery Member, PRO Posts: 148
    I'll give it a shot. Thanks!
  • ShaunEleryShaunElery Member, PRO Posts: 148
    That did it! thank you
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    You are welcome. Glad it's working for you!
Sign In or Register to comment.