Math formula problem
The following formula is list in essential mathmatics for gams and interactive applications. It is from page 640 and involves response impulse to collisions.
Specifically what is listed on a particular line is this:
float denominator = (1.0/Mass + 1.0/otherMass)*(collisionNormal.Dot(collisionNormal));
It seems to me the author is saying at the end of the statement to multiply by the dot product of a normal with itself. Isnt the dot product of any vector with itself always 1. And there fore the state is saying to multiple by one at the end,, which would be useless. Am I reading this wrong???
Thanks,
Matthew
I assume it should be something like
float denominator = (1.0/Mass + 1.0/otherMass)*(collisionNormal.Dot(OTHERcollisionNormal));
I think this would give you a measure of how direct the collision was between two objects, whether it was head-on or just a graze. I'm not totally sure how hes defining a collisionNormal though, so this might not be right.
float denominator = (1.0/Mass + 1.0/otherMass)*(collisionNormal.Dot(OTHERcollisionNormal));
I think this would give you a measure of how direct the collision was between two objects, whether it was head-on or just a graze. I'm not totally sure how hes defining a collisionNormal though, so this might not be right.
Oh my bad, I was thinking of a different setup.
The dot product of a vector with itself is only one if it is normalized. Otherwise it is equal to the length squared of the vector. Or for vector v:
|v| = sqrt(v.v)
http://en.wikipedia.org/wiki/Dot_product
The dot product of a vector with itself is only one if it is normalized. Otherwise it is equal to the length squared of the vector. Or for vector v:
|v| = sqrt(v.v)
http://en.wikipedia.org/wiki/Dot_product
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement