Accelerate in the opposite direction when coliding. How?

CabacoCabaco Member Posts: 414
edited November -1 in Working with GS (Mac)
I want the actor that collides with the other actor to bounce and accelerate in the opposite direction. Also, when my actor collides with the enemy it seems that when I let go of my ball, it just starts going down or something. Any help?

Comments

  • CaniohCanioh Member Posts: 200
    CabacoAppNews said:
    I want the actor that collides with the other actor to bounce and accelerate in the opposite direction. Also, when my actor collides with the enemy it seems that when I let go of my ball, it just starts going down or something. Any help?

    Can't you just say when collide change attribute self.rotation to self.rotation-180?
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    When actor overlaps or collides with 'Bad Guy', Change attribute self.motion.linear.x to -200

    Change the -200 to whatever speed you want it to move at

    Ace
  • CabacoCabaco Member Posts: 414
    Thanks! What about my other prob when it collides, my ball strangely accelerates to a random direction?
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    On the ball settings, under the physics tab, uncheck moveable.

    Hopefully that should work!

    Ace
  • CabacoCabaco Member Posts: 414
    Thanks done that!
    But the balls still dont bounce realisticly... I want them to bounce like in air hockey. Help please
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Play around with the restitution numbers in the Physics bit

    Ace
  • CabacoCabaco Member Posts: 414
    Already put the max restitution possible for both the actors, but no results. How do I do like in air hockey for example. My game is just some balls coming at you and you have to defend a circle from them.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Make a screen recording of the gameplay and I'll take a look or you could send me your project to info@instantmashgames.com and I'll have a play around with it

    Ace
Sign In or Register to comment.