I have a problem rotating an object with quaternion, when I rotate the object I use the function slerp to rotate from one rotation to another, but in this process the object loses its local Y axis rotation, so I want to know how could this be avoided, the code that I use:
var orgRot = transform.rotation;
var myForward = Vector3.Cross(transform.right, normal);
var dstRot = Quaternion.LookRotation(myForward, normal);
for (var t: float = 0.0; t < 1.0; ){
t += Time.deltaTime*2;
transform.rotation = Quaternion.Slerp(orgRot, dstRot, t);
yield;
}