- Home /
Can't get this camera to collide with colliders... please help?
Basically, I want to prevent the camera from going through objects. I have used collider boxes as "objects" the camera cannot go through. I am using the camera + scripts + player from the AngryBots project.
I have tried the following things: Make the camera a collider. Didn't work. Make the camera a rigidbody. Didn't work. * Make the camera a collider and a rigitbody. Didn't work.
So, I tried looking around and I found the camera code in Scripts\Movement\PlayerMoveController.js. I think it is hardcoded in this file. However, I am not sure where to go from here as it is a bit confusing.
I tried using someone else's camera collider script as an example to work from but they have a bunch of extra object variables.
Can someone help me out please? For your convenience, the code from Scripts\Movement\PlayerMoveController.js is located here: http://pastebin.com/A3e8JfPB
Thank you very much.
Your answer
![](https://koobas.hobune.stream/wayback/20220612190315im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Internal collisions 1 Answer
How to change first person controller input when passing through a collider? 1 Answer
Get the collider component of a child element 1 Answer
camera collision 1 Answer