I can calculate the speed when there is no angle, but I can't calculate the speed when it is angle.

Physics paramaters:

Player Physics : 
    radius : 15,
    bounce coefficient(coefficient of restitution) : 0.5,
    mass : 2
    damping : 0.96101

Ball Physics :
    radius : 8,
    bounce coefficient(coefficient of restitution) : 0.5,
    mass: 1,
    damping : 0.9902

Gif image(angled): haxball gif angled

Player speed on start: Vx: 5, Vy: 0

Ball speed on start: Vx: 0, Vy: 0

Player speed on collision: Vx: 3.4189778846153844, Vy: -0.9240480769230772

Ball speed on collision: Vx: 2.7721442307692317, Vy: 1.8480961538461544

The formula i use(this formula can calculate the speed when there is no angle): Formula image: Formula image

V1 = (m1*u1*k1 + m2*u2*k2 + m2*C1*C2*(u2*k2 - u1*k1)) /(m1 + m2)
V2 = (m1*u1*k1 + m2*u2*k2 + m1*C1*C2*(u1*k1 - u2*k2)) /(m1 + m2)

C1 and C2 bounce coefficient of player and ball.

How can i do?


1 Answer 1


The bottom of This page provide clear equation and explanation of 2D circle collision. It's might help. Note: As you see in that page, you collision equation only work in impact line (normal of contact surface) but the tangen velocity still the same cause by no serface friction. the general idea is to transform velocity to tangen and normal velocity. update normal velocity with your equation then transform back to original frame of reference.

  • \$\begingroup\$ This answer would be better if it included a summary of the explanation and calculation from "this page," that way the information is preserved even if the linked resource ever changes, moves, or goes offline. \$\endgroup\$
    – DMGregory
    Commented Jun 30, 2020 at 16:58
  • \$\begingroup\$ Okay, I will edit soon thank for feedback. \$\endgroup\$
    – M lab
    Commented Jul 1, 2020 at 6:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .