Brand spanking new hobbyist. Not the best programmer; understanding of OOD, not so much vector math. Learning though, and it’s fun! I have a camera.
I position it, transform.position.
I rotate, transform.rotation.
I move it behind and above, .translate(0, 3, -5);
Now it’s in the position I want,the heading I want, matching a “parent” transform. A player. All is good. So far just transform → transform 1:1 matching, displaced. Simple, awesome.
Now rotate camera again - ignoring all previous transformations. How would I do this? Currently I can make a pretty neat 3rd-person camera - by multiplying a quaternion.euler derived from mouse input by the player’s rotation.
cameraTransform.rotation = (playerTransform.rotation * Quaternion.Euler (camRotX, camRotY, 0));
Result: A camera which rotates with the player, and can be rotated around the player by the mouse.
Desired: A camera which rotates with the player, and can be rotated in place at that position.
I’m really drunk right now, so I will probably figure it out some time tomorrow and share my implementation. In the mean time, anyone more experienced - who is not afraid of pseudo-code - your input is welcome warmly. Unfortunately this evening I have pass the point of coder-augmentation-inebriation.