Time when 2 objects will touch

Hi, I have 2 balls which rolls in different directions (something like billiard). I need to predict if the balls will touch and if they will I need to know when (in seconds). I know:

  • initial position of each ball VECTOR3
  • velocity of each ball VECTOR3
  • radius of each ball FLOAT

Any ideas? :slight_smile:
Thanks

You may try this to find intersection of two lines.

http://www.wyrmtale.com/blog/2013/115/2d-line-intersection-in-c

This is in Vector2 by the way, Vector3 will be much complicated. THen you can find time by t = x / v

Hope this helps.