This is possibly not the ideal place to post this; but I'm hoping someone with a good idea of 3D math can help me a bit.
I'm planning something for a project, and am trying to find out how to implement some of the more neccessary parts. One of these parts is obviously, collision and collision response; and I'm at 3D elastic collisions right now.
Based on the code and walkthrough on this site, http://www.geocities.com/vobarian/2dcollisions/ I got a 2D test working, all is good, and I certainly prefer this method to text I've seen using lots of trigonometry.
I'm assuming this same method can be applied in three dimensions, and it seems to work; but I'm having a problem calculating one of the neccessary values; I need to find ONE of the points (vectors) that lies on a tangent plane between two objects. Without this, I can't calculate the unnafected part of velocit(ies), and energy drains from the system rapidly; with an incorrect value, the system gets unstable and fluctuates from loads of energy to little energy... This isn't elastic, and isn't good. That guide uses 2 dimensions, and in two dimensions:
N = [Nx, Ny]
T = [-Ny,Nx]
Where N is the normal, and T is one of the tangents. This is the only part in the guide that can't be translated directly into 3D.. And it certainly has a massive effect on the values that are calculated..
I'm thinking rotation of the normal vector about its bitangent would work; but.. if I had the bitangent I'd have a tangent vector allready... Is there an easy way to find any one of these tangent points? Most information I've found is about finding the bitangent from a normal and a tangent, or finding out if a point is on a tangent plane... I'm not able to mix math around very well myself, most I know is based on knowledge rather than understanding..
Can this method work for 3D elastic collisions? It seems viable providing that the correct velocity on the tangent and a bitangent are added to the result of the velocity exchange along the normal... If anyone knows a better way to calculate velocity for two moving objects that collide; or if this method wont work in 3D, that would be helpful also..