Can't get this camera to collide with colliders... please help? (27289)

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: #pragma strict// Objects to drag inpublic var motor : MovementMotor;publ - Pastebin.com

Thank you very much.

take alook at this

here

section 2 and 3 will help you alot.