- Home /
Comparing a quaternion to a contact point normal
I'm using the NewtonVR package for object physics. One of the classes, NVRInteractable has a standard Rigidbody. I'm attempting to compare the angle of object A with the contact normal when colliding with object B.
More specifically. I have a box and a sword. I'm trying to create a slashing coefficient (blunt edge does much less damage than the sharp edge, about 0.2-1 with a curve that I'll define mathematically) by comparing the rotation of the sword to the contact normal generated by the collision with the box.
I tried normalizing the quaternion and comparing the two since the contact normal is already normalized but I was getting numbers well outside of the normalized range. I also tried getting the dot product of the two but I was similarly getting a very odd set of numbers.
Was I right to try this? Should I be tackling this problem with some other method?
Thank you for any help!
Your answer
Follow this Question
Related Questions
Transform rapidly spins when flipped upside down. 2 Answers
Calculate Rotation based on mesh normals 1 Answer
Rotating with a preferred driection. 0 Answers
Rotate Player to Match Surface Normal While Still Maintaining Y Rotation 0 Answers
Rotating an object to equal normals of object below 1 Answer