Implementation question from a beginner. I would like to implement a functionality to a first person game where the player can pick up notes lying around and have the note align itself to the camera and get bigger for the player to read its contents. The game will have a Myst like feel to it.
I am currently debating whether I should use the UI or just animate the note object in the world itself and have it “fly” towards the camera.
The end game will be that the player has to go around picking up notes to solve a mystery. So I am looking at a way to design and handle the notes as world objects as well as nice close ups for the player to read and inventory items.
You could do many things, all have their advantages and inconveniences.
They mostly involve moving elements from their original position to a zoomed state. To move the position, use Vector3.SmoothDamp. To rotate to the right angle, use Quaternion.Slerp.
For the best graphics quality, I think you could disable your look script, and move the camera in front of the note. You can do simple math to calculate the ideal position, using the field of view and the dimension of your note.
For the easiest to implement, your notes could be UI elements in world space, or sprites if your write the text in the texture, that you fly towards the camera.
For a better trajectory, either initialize the velocity element of smoothdamp to the normal of the item (jump effect), or use bezier curves.
If notes are an important part of your gameplay, flying them towards the camera can feel a lot less cheap than just a popup. The more fancy an interaction is, the more the user will feel it is important.