Recreating a forced perspective technique
I got interested in recreating a similar feature from the game Superliminal. The feature allowed object sizes to change without changing the users perspective of the game object.
I took a simpler approach to this as you will see in the demo gif below.
Now of course there is a mathematical explaination for this which is commonly known as "Angular Diameter".
We can see its dependent on both distance and diameter.
In short, Angular Diameter is a way of describing how an object is viewed at different points of view. In terms of our little demo, to achieve our goal we need to maintain the angular diameter given a change to the distance and size.
In reality, we just need to proportionally scale the size of the object relative to the distance.
Creating a weird perspective change.
The final product can be seen in the gif below.
We can see little to no change in our perspective of the object, however, the size changes drastically.
WASD - Movement
Shift - Sprint
E - Pickup
Q - Drop
G - Activates the perspective change
FirstPerson_Controller.cs - Movement and Camera controls
FPC_Bob.cs - First person bobbing movement (Was experimenting)
Pickup_Controller.cs - Interactable pickup controls + angular diameter method.