Forum rules - please read before posting.

Disabling Main Camera for Raycasting

mdkmdk
edited August 2014 in Technical Q&A
I've integrated a mini-game into my AC game.

The mini-game has its own Main Camera that needs to raycast to objects in the mini-game (keypad keys). I've used the Engine: Manage Systems action to disable the camera, but Unity3D appears to be still regarding the AC Main Camera as THE Main Camera, which means the Main Camera in my mini-game is unable to raycast.

Is there a way to tell Unity3D via AC to switch from the AC Main Camera to my mini-game Main Camera, so I can raycast? Do I need to pop in:

cameraObject.camera.active = false; 

...somewhere?

Comments

  • It's likely the "MainCamera" tag on the camera that determines it.  Use a script to de-tag the AC MainCamera and place it on the new one - that ought to do it.
  • Thanks, Chris. Will give it a shot.

    Cheers
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.