1

I want to make a 2d game similar to rocket league and I'm struggling with the physics engine. What I've gotten from my research is that there are elastic and inelastic collisions. Neither works for my purpose.

Let's say ball A is at a standstill and ball B is moving.

B-> A

In an elastic collision, ball A and B would switch momentums.

BA

B A->

In an inelastic collision, they would stick together.

B-> A

BA->

BA->

What I want is for them to bounce away. B bounces to the left a bit, and A gets most of the momentum and moves right.

What kind of collision is that?

Thanks!

  • 1
    This might be more of a physics question, but I believe you are still implementing an elastic collision. In order to implement this you are likely going to apply forward momentum to `A` and a portion of backward momentum to `B`. Again, this is likely a more physics question, but if you bring a partial implementation here we'd be happy to assist. – Phillip Thomas May 21 '18 at 17:45
  • 1
    Also, look up *coefficient of restitution*. – meowgoesthedog May 21 '18 at 17:47
  • 1
    If you could have different masses an elastic collision could work: consider mass of B tiny, it would bounce back to the left without moving A much. I would guess having B's mass a little bit lower than A's would produce your desired outcome. – Mats Lind May 22 '18 at 14:50
  • Thanks for the help. @MatsLind If B's mass was lower than A's wouldn't it still stop and hit A forward but slower? – Invincible Blaze May 22 '18 at 15:37

0 Answers0