c# - Calculating time based on velocity, distance and radius of two balls -


How do I get the required time for the following two constants when the following constants are

Initial

Radius of both the balls

I am using C # for some examples in Unity 3 for code. . I am not asking for codes, I want to know what to do to do this (physics).

Any help is appreciated

Distance = velocity time

Distance between balls for their size: Distance = P1 - P2 - (R1 + R2)

Velocity balls (V) is the combined velocity: V = v1 + v2 ** Note that the direction matters. If they are going to each other, then they do yoga. Far away from each other, they subtract.

So now ... V * T = P1 - P2 - (R1 + R2)

Time for collision: T = [P1 - P2 - (R1 + R2)] / V


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -