Hi, I have a normal that I need to put into the same plane as the one defined by the up and forward vectors of an actor. Intuitively, I need to discard the "side" components of my normal to get only its pitch, and this to work whatever the current rotation of my actor.
In math this means I need to have a quaternion whose vector is the forward vector, and rotate my normal a certain angle around this forward vector. I am not sure how to determine this angle. This can't be the angle between my normal and the up or forward vectors, for this my normal would already need to be in the plane of one or the other. Remember I need to determine the angle whatever the current rotation of the actor is.
In math this means I need to have a quaternion whose vector is the forward vector, and rotate my normal a certain angle around this forward vector. I am not sure how to determine this angle. This can't be the angle between my normal and the up or forward vectors, for this my normal would already need to be in the plane of one or the other. Remember I need to determine the angle whatever the current rotation of the actor is.
Comment