Hello everyone!
Kind of struggling to achieve a smooth camera movement, mostly I am having a hard time to define all the math that goes into it and so I am here to ask all of you help with the math part.
Ideally, what I would like to achieve is this:
I have a character in a position. Let’s say that the position is (0,0,0).
I would like to have a camera facing the character. The camera should then move upward in a spiraling movement and at the same time keep the focus on the character’s head (so I guess adjust the pitch value of the camera).
Ideally, I would like to have variables to store the following information:
- how many “steps” to achieve a full 360-degree rotation
- how many 360-degree full rotations
- how much the camera should move upwards after completing a whole rotation. So, for example if the camera starts at z=0, after the first rotation it should be at z=0.2, and then z=0.4 at the end of the second rotation and so on until it reaches the max number of rotations and always pointing to the character
How can this be achieved?
Hope I have been clear, if not please let me know.
Thank you all for the help!
Dan