playMaker

Author Topic: Mouse Pick Event - Choose Camera  (Read 172 times)

Andorix

  • Playmaker Newbie
  • *
  • Posts: 12
Mouse Pick Event - Choose Camera
« on: July 25, 2022, 08:06:48 AM »
Hi,

As I understand it, for Mouse Pick Event to work, the camera has to be tagged as Main Camera. This is problematic for me since I have things rendered to my Overlay Camera that I want to mouse pick. If I tag my overlay cam as main cam, it seems to cause all sorts of problems, like mouse pick events on normal objects (rendered to the real main camera) not working.

Plus I have the same problem for UIOnPointer enter/exit. I have a textmeshpro(UI) inside a canvas (world space), but when it's rendered to the overlay camera and not the main camera, the action won't work. 

Can we get a Mouse Pick Event / UIOnPointer Event that lets you choose which cam to pick from? Or some other solution? Thank you  ;D
« Last Edit: July 25, 2022, 10:44:30 AM by Andorix »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7025
    • jinxtergames
Re: Mouse Pick Event - Choose Camera
« Reply #1 on: July 25, 2022, 09:19:34 PM »
Hi.
There might be some custom actions on the Ecosystem

Andorix

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Mouse Pick Event - Choose Camera
« Reply #2 on: July 26, 2022, 08:51:31 AM »
Hey djaydino,

I indeed found a custom action for Mouse Pick Event, thanks.
No such luck for UIOnPointer events...

I ended up going with a different solution that seems to work for everything. When I need events for the overlay camera I send an action that changes the tags for overlay camera to 'main camera', and main camera to 'untagged'. When I need events for main camera I send an action that switches the tags back.

Luckily the need for events for each camera arise at separate times in my game (character switches on/off a notebook, everything in the background is blurred/unblurred accordingly). But if I would need them both at the same time, not sure what I'd do...