"That won't work - entities may be different sizes - or may not be travelling directly in front/behind of camera."
Your question makes no sense.
Your question as written boils down to this:
"Two entities collide. How do I dtermine which one is in front of the other?"
How do you define "in front of"?
Nearer to the camera? That's easy. And doesn't matter if you're in front of the camera or not.
Drawing on top of the other? Ie, sphere 2's center is closer, but it's smaller and inside of sphere 1 because sphere 1 is bigger and sphere 1 draws on top. In that case, you can:
A) Do a linepick...
B) Look at all the vertices and find the one nearest the camera.
C) Subtract the radius from the distance of the center of each, so Sphere1 comes out closer than sphere 2 even though sphere 2's center is nearer the camera.
Or is there some other measure which you are using to determine "in front"?
Your question makes no sense.
Your question as written boils down to this:
"Two entities collide. How do I dtermine which one is in front of the other?"
How do you define "in front of"?
Nearer to the camera? That's easy. And doesn't matter if you're in front of the camera or not.
Drawing on top of the other? Ie, sphere 2's center is closer, but it's smaller and inside of sphere 1 because sphere 1 is bigger and sphere 1 draws on top. In that case, you can:
A) Do a linepick...
B) Look at all the vertices and find the one nearest the camera.
C) Subtract the radius from the distance of the center of each, so Sphere1 comes out closer than sphere 2 even though sphere 2's center is nearer the camera.
Or is there some other measure which you are using to determine "in front"?