- Home /
How do I use mathf.clamp to make boundaries for a camera
Hi everyone.
I'm new to using Unity and C#. I am working on a project for uni and need some help please. I'm trying to make a side scrolling shooter game, like R-type. I am trying to make the camera work in the same way as R-Type.
The camera in R-type is always moving at a steady pace to the right and the player is bounded by the camera itself so they cannot move off the screen.
I can make the camera scroll at a steady pace but not sure how to/if I have to use mathf.clamp to set up the boundaries for my camera. If I do need to use mathf.clamp would this script be attached to just the camera or also the player gameobject?
Any help is greatly appreciated
Your answer
Follow this Question
Related Questions
How to Math.f Clamp this 0 Answers
How to make camera position relative to a specific target. 1 Answer
How Do I Make The Camera Orbit Stop at a Certain Point? 0 Answers
Limiting Rotation x of Main Camera 1 Answer
clamp rotation the other way? 1 Answer