I'm making basketball throwing simulator and I have two questions about the collision response. To make collision response with any surface like the wall or ground, I'm using the following formulas to calculate impulse then linear velocity and angular velocity after collision:
for more info about the formula see this. The formula in the picture is a little bit different from the one in the site cause the mass of the object B(which is a surface) is considered infinite.
First question: the vector r(AP) is from the center of the sphere to the collision point, and the normal vector (n) goes in the opposite direction, so the cross product of these two vectors is zero vector, only (1/ma) left in the denominator of the impulse. And for angular velocity the cross product of r(AP) and the normal will be also zero vector and this leads to not to rotate after collision and this is wrong of course, what's the problem with these results?
Second question: in the denominator of the impulse: (n) dot ( ( n cross r(AP) ) / I cross r(AP)
What's the order of operations in this case, should I do the cross products first then the dot product at the end, or just do the operations from left to right?