THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2008 at 09:57, xxxxxxxx wrote:
Cinema 4D Version: R11
Language(s) : C.O.F.F.E.E ;
I have a ray kollision between two objekts at an object.
The ray send object allways looking at the Ray target object.
And the target object have the same rotation like the start object.
When I move the objects they are allways parallele.
Inbetween the objects is the object I want to calculate the surface.
For this I read the Phong normal.
now I have the matrix of the ray send object.
This is the same direction as the ray self have.
I need the different of the angles.
How can I calculate ?
Do you have an code example ?
In the SDK I found and use long time, to calculate position and rotation for objects. But everytime without normals :-(
On 11/10/2008 at 05:16, xxxxxxxx wrote:
You can not calculate a difference angle between a matrix and a vector. You can only calculate the angle between a vector and one of the vector components of a matrix, for instance V1, V2 or V3. Use the dot product to calculate the angle. It returns the cosine of the angle between two vectors.
Dot Producton Wikipedia