how two perpendicular vectors can have a dot product not equal to 0 in Unity?
Thats my script for a simple Cube, that moves only in 2D:
void OnCollisionEnter(Collision collision)
{
ContactPoint contact = collision.contacts[0];
//Calculate reflection Vector3 on collision normal
reflect_direction = Vector3.Reflect(rigidbody.velocity.normalized, contact.normal);
impact_direction = rigidbody.velocity.normalized;
angle = Vector3.Dot(reflect_direction, impact_direction);
}
Now for example In my on screen display I see values as:
angle == 0,9852035
impact_direction == 0.1, 1.0, 0.0
reflect_direction == -0.1, 1.0, 0.0
How on earth is the dot product close to 1 !?!?!?!
Also what worries me is the fact, that for this example, the ship was flaying with big velocity in the OX axis and the impact_direction shows, that the OY value is bigger ?!?
Any help?