I’m really drawing a blank as to why this is happening.
`var angle: float = Vector3.Angle(v1,v2);
transform.rotation.ToAngleAxis(angle,Vector3.up );
`
I get this error
The best overload for the method ‘UnityEngine.Quaternion.ToAngleAxis(ref float, ref UnityEngine.Vector3)’ is not compatible with the argument list ‘(float, UnityEngine.Vector3)’.
Someone told me “ref passes a reference rather than a copy, so var changes in the function propagate to caller scope” but I am not grasping the problem and how to fix this.
Any help would be appreciated!
yes, although, in this case, it is 'ref' instead of 'out' :)
– Loius@Loius According to the [documentation][1] it's
– Dave-Carlileout:) [1]: http://docs.unity3d.com/Documentation/ScriptReference/Quaternion.ToAngleAxis.html