Andrew Davey

04-23-2004, 04:34 AM

Whats the easiest way to see when an animated line has crossed into the radius oif a sphere, i assume thats how you detect a collision. My guess is i get the distance between the current point oon the line, cX,cY,cZ and the init points of the sphere, iX,iY,iZ.

so:

dX = iX - cX;

dY = iY - cY;

dZ = iZ - cZ;

Then i guess i check to see if the distance (dX,dY,dZ) is in fact less than the sun radius.

Is this right or wrong? Can someone point me in the direction to where i might find more information on this. Like the actual maths, e.g. do i need rto use vecters and normals, and what are they.

Cheers Guys vbery much appreciated

so:

dX = iX - cX;

dY = iY - cY;

dZ = iZ - cZ;

Then i guess i check to see if the distance (dX,dY,dZ) is in fact less than the sun radius.

Is this right or wrong? Can someone point me in the direction to where i might find more information on this. Like the actual maths, e.g. do i need rto use vecters and normals, and what are they.

Cheers Guys vbery much appreciated