Question by
ErikHallmarkDev · Jan 14, 2017 at 10:32 PM ·
rotationvector3
Face normals.
I've got a problem that I just haven't been able to figure out.
I have this script with a Vector3 called normal, it's a direction relative to the transform of the game object that it's attached to. I want to be able to rotate the game object so that normal would be facing in the exact opposite direction of another normal.
Ideally I'd have a function like this in my script.
public Vector3 normal;
void RotateMe(Vector3 otherNormal) {
//... Do some magic to rotate the attached game object so it's normal faces the other normal.
}
So I could just plug some normal into this function, and it would rotate my game object. Any ideas on how this could be achieved?
Comment
Your answer