- Home /
2.5d Side Scroller Dynamic Camera Zoom
Hey guys...
I'm creating a side scroller game. So I search bout camera references and I fount this video:
http://www.youtube.com/watch?v=Beph26yVVxQ
I'm thinking about 'how to create a dynamic zoom system'...
Some one have any xp on create it? I'm thinking about use raycast on X and Y to determine the distance of the player in relation to objects and then calculate the disância camera. Is this is a good practice?
Please, I need advice or direction... Tks.
Sorry about my poor english.
Answer by ElChileVengador · Aug 06, 2014 at 05:12 PM
Well in the video shown, it seems that there are distinct 'zones' for the different camera zooms; one easy way to do this is to have several triggers on the path that call 'Camera.main.fieldOfView' and change it when the player passes through them. You can use Mathf.Slerp to have that nice tween from one field of view to the next. Hope this helps.
Your answer
Follow this Question
Related Questions
Pinch zoom 0 Answers
WebCamTexture zoomed in on iPad Pro 1 Answer
How to move the camera closer to the player while there is an object between them? 1 Answer
Zoom camera to correct FoV based on Rect size 1 Answer
Ortho camera zoom to mouse point 4 Answers