Perspective Correction

I didn’t like the FOV solution as it zooms in too much for my liking.
So to control the perpective rotation, introduce a new variable “[SerializeField] float controlRollAngle”.

Multiply the local x position by the local y position by the controlRollAngle, because of this multiplication, the controlRollAngle expects really small values like from 0.01 to 0.1.

Then just add it to the final roll, it should look something like this:

var perspectiveCorrection = transform.localPosition.x * transform.localPosition.y * controlRollAngle;
var roll = xThrow * controlRollFactor + perspectiveCorrection;
1 Like

I love how because you didn’t like something you decided to make something new and better! That’s being a programmer! Great job!

1 Like

Privacy & Terms