What we need
Hello, this is Delficks friend.
I'll try to explain the problem as best i can.
We have two 2D objects, which in order to make it easier for the computers running this simulation, are treated as circles.
We have the velocity and mass of each object, and can add any other data needed. As this is a computer simulation, I am not limited by what goes into the equation, so if we need to for instance know the friction, i can always go back and make up values for the objects. Although in that case, friction will probably just complicate the situation.
Ok, so the two objects collide, and we can know any information we want about the objects before the collision. Then i want to be able to calculate the new velocity of both objects, at the very minimum taking into account the mass of each object.
So, i have this:
x, y value of each object at the time of collision.
radius of each object.
direction each object is heading. This is in this format:
0 = right, 90 = down, and so on
velocity of the object in meters per second
mass of the object in kilograms
I obviously know the mass, velocity and direction of each object at the collision, as they are stored as variables in my program (becoming the known values?)
It doesn't matter how many equations i have to run, but as I am not that good with maths, it would be helpfull if you could help me (translate?) the equation so that only one variable is on one side of the equation
e.g.
Velocity Of Object 1 = ...
Some variable needed for Direction calulation =
Direction of Object 1 = ...
Velocity Of Object 2 = ...
Direction of Object 2 = ...
P.S. Oh, i can determine the angle of the collision easily (good ol' trigonometry)