Two dimensional elastic collisions with varying angle of incident

If in an elastic collision I know all initial values and that mass for each object remains constant throughout the collision (but different from one another) how can I determine their final velocity vectors when the angle of incident is also a variable?

I've tried decomposing the vectors and have determined that for perpendicular collisions the following formula will work:

$$v_1=\frac{u_1(m_1−m_2)+2m_2u_2}{m_1+m_2}.$$

Will this work for variable angles as well?

In general, there is no solution to the outgoing velocities of the particles. You need 6 components (three components of velocities for each particles) but you have only 4 equations (three components from the conservation of momentum, one from the conservation of energy). There are 2 equations missing.

To resolve this problem, you have to define what happens microscopically during the collision. For example, you can use a known potential for the interaction between the two particles and derive the trajectories.

This equation works but for those components of velocities in direction of contact of two bodies i.e in the direction of forces they exert on each other,in the direction perpendicular to the force the velocities won't change.

For an elastic collision of two particles the direction of the change in velocity of both particles will be equal to the normal of the point of contact, if the center of masses of both particles and the point of contact lie on one line and the particles are not rotating/have no friction. Otherwise you also would have to deal with changes in rotation.

But this will often depend on the shape of the particles. If you would want to know what would happen after an elastic collision of two circular/spherical particles (with uniform mass distribution, so the center of mass is located in the middle of the particle), you would be able to use this, since the center of masses of two particles and the point of contact will always lie on one line.