Forum rules - please read before posting.

Can't detect hotspot through overlay camera in main camera stack?

edited September 2024 in Technical Q&A

So, I set the render type of a camera to overlay and made it a stack for the main camera, allowing me to activate it via an action list to create a pop-up window similar to a UI. However, I discovered that I cannot detect hotspots through the overlay camera. Do you have any ideas about this?

Unity version: 2022.3.41f1c1
AC version:1.81.6

Comments

  • By default, AC relies solely on the MainCamera for raycasting.

    You can alter this through script, however, if you first check Cache 'Camera.main' variable? in the Settings Manager.

    Once done, you can then update AC's record of the scene's Main camera with:

    AC.KickStarter.CameraMain = myCamera;
    

    Updating this to the stack camera, when it appears, may be enough - though you'd lose control over regular clicks in the scene.

    The other approach would be to avoid multiple cameras, and just teleport the close-up in front of the camera, parenting it to a Marker that is itself parented to MainCamera so that it always appears in the centre.

  • Thank you so much! They're both very good solutions!

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.