I am trying to amplify the rotation of the Camera in VR. Essentially, if you look 15 degrees to the left, the camera actually turns 30 degrees.

To rotate the camera, I am using a parent object and manipulating the parent transform.

My current solution uses Euler angles, which is causing a lot of problems due to the flip from 0 to 360 degrees. I have tried to mitigate this in my code, but when the HMD is pointed straight up or straight down, the camera ends up tilted somehow.

I figure quaternions will help fix this, but I am finding it difficult to implement a solution as I don’t know how to scale a quaternion. I also can’t find a similar function to RotateAround using quaternions. [I think] I need this function as the parent transform I am rotating isn’t in the same position as the camera.

My current solution simply takes the change in euler angles between frames, and scales it by a factor. See below:

[ICODE]

```
void ApplyRedirection(Vector3 newOrientation, Vector3 curOrientation)
{
float changeInPitch = newOrientation.x - curOrientation.x;
if (changeInPitch > 200)
{
changeInPitch -= 360;
}
if(changeInPitch < -200)
{
changeInPitch += 360;
}
PitchChange = changeInPitch;
camOffset.transform.RotateAround(currentHeadPosition, new Vector3(0, currentHeadOrientation.y, 0), changeInPitch * redirectionIntensityP * Time.fixedDeltaTime);
float changeInYaw = newOrientation.y - curOrientation.y;
if (changeInYaw > 200)
{
changeInYaw -= 360;
}
if (changeInYaw < -200)
{
changeInYaw += 360;
}
YawChange = changeInYaw;
camOffset.transform.RotateAround(currentHeadPosition, new Vector3(0, currentHeadOrientation.y, 0), changeInYaw * redirectionIntensityY * Time.fixedDeltaTime); //Do yaw reditection (horizontal)
currentHeadOrientation = newOrientation;
}
```

[/ICODE]