Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Disastercake on May 28, 2012, 04:10:38 PM

Title: [SOLVED] Mouse Pick Issues
Post by: Disastercake on May 28, 2012, 04:10:38 PM
I thought I had the quirky mouse pick action all figured out, but now it's back to laugh in my face. >.<

What should the checklist be to make sure that I am able to use the mouse pick in a 2D game using an orthographic correctly?

I'm using it fine in one level, but I see no difference between this level setup and the last, yet this level refuses to get a V3 from the mouse pick.
Title: Re: Mouse Pick Issues
Post by: Disastercake on May 28, 2012, 04:48:08 PM
To clarify:
In the level it works I had to create an invisible frame right in front of the camera.

In this next level I've done the exact same thing.  It has the default mesh colider on it, and I'm not filtering by any specific type.  But the second level refuses to get any sort of mouse pick coordinates.
Title: Re: Mouse Pick Issues
Post by: Disastercake on May 28, 2012, 06:22:30 PM
I just found my issue:

I didn't have my camera set to MAIN CAMERA tag.

This happened because I deleted it and made a new one, and it spawned in as UNTAGGED.

So why is this exactly?  Is this by unity design or by playmaker design?

Does this mean I can never have a second camera use the MOUSE PICK action?
Title: Re: Mouse Pick Issues
Post by: Alex Chouls on May 28, 2012, 10:30:16 PM
A lot of Unity scripts use MainCamera by convention. You can use Set Main Camera on the fly if you want to pick etc. from a secondary camera. I'll add notes to actions when they use the MainCamera... and maybe an Error Check for this too...
Title: Re: Mouse Pick Issues
Post by: Disastercake on May 28, 2012, 10:44:15 PM
Thanks Alex! =D