- This was breaking the 'orbitWithMouse' sample
if(target)
{
Euler eulerCamera = orientation, euler;
+ Euler eulerTarget = this.target.transform.orientation;
+ // Cannot rely on 'this.target.eulerOrientation' as it is only updated when calling Rotate()
- euler.Add(eulerCamera, this.target.eulerOrientation);
+ euler.Add(eulerCamera, eulerTarget);
// Logf("yaw = %f, pitch = %f\n", eulerCamera.yaw, eulerCamera.pitch);
void RotateEuler(Euler rotation, Euler min, Euler max)
{
+ // WARNING: 'eulerOrientation' is only updated by this function
Euler euler = eulerOrientation;//transform.orientation;
euler.Add(euler, rotation);