playMaker

Author Topic: Screen Pick with multiple Main Cameras?  (Read 5464 times)

markinjapan

  • Full Member
  • ***
  • Posts: 103
Screen Pick with multiple Main Cameras?
« on: August 12, 2012, 02:36:52 PM »
Hi,

Is there any way I can get this action working with multiple cameras?

I have a split screen set up and i'm using Screen Pick to select objects in the 2 cameras but only 1 camera works. The other camera only works if I disable it so I know it's something to do with the Main Camera.

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Screen Pick with multiple Main Cameras?
« Reply #1 on: August 13, 2012, 03:22:56 AM »
Hi,

 Yes, currently screenpick only accept the main camera. so if you have two or more cameras, it's not going to work unfortunatly.

 I'll see if I have time this week to make an update on this action to accept any camera.

bye,

 Jean

tofusoup

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Screen Pick with multiple Main Cameras?
« Reply #2 on: January 23, 2013, 03:47:25 PM »
I want to bump this.  It seems really useful, considering everyone uses a 2nd camera for UI.  I know we can set the main camera but it be more convenient if we just had an option to select the camera.

thanks

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: Screen Pick with multiple Main Cameras?
« Reply #3 on: January 23, 2013, 04:53:22 PM »
PlayMaker uses a system that tries to optimize the use of raycasts in regards to the screenpicks. Therefore any unofficial action is slower than the original, if used multiple times at once.

That being said, these are the actions I use for it. I didn't share them for the abovementioned reasons.

PS: those actions are written entirely by me (Playmaker isn't open source, duh :D) so there might be bugs.
« Last Edit: January 23, 2013, 04:55:15 PM by kiriri »
Best,
Sven

tofusoup

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Screen Pick with multiple Main Cameras?
« Reply #4 on: January 23, 2013, 09:50:23 PM »
Thanks!  I'll check it out.

VectorF22

  • Junior Playmaker
  • **
  • Posts: 50
Re: Screen Pick with multiple Main Cameras?
« Reply #5 on: April 28, 2013, 01:14:47 PM »
Kiriri, this is amazing!! This should really be part of the standard Playmaker build. I have a separate cam for a secondary gui and this works perfect thanks!

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • Grinder Games
Re: Screen Pick with multiple Main Cameras?
« Reply #6 on: April 28, 2013, 11:46:32 PM »
It would be great if that would also work with touch input! 8)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Screen Pick with multiple Main Cameras?
« Reply #7 on: April 29, 2013, 03:41:20 PM »
Hi,

 Actually, I think these actions would simply need to expose the screen position, then ANY framework or system would be able to use that.

 I have attached a version of CustomScreenPick that expose the screen position, so you can inject whatever.

Bye,

 Jean

Grohowiak

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Screen Pick with multiple Main Cameras?
« Reply #8 on: November 20, 2013, 09:38:42 AM »
Can somebody tell me where do assign the Set Main Camera?
To the main camera or to Game Object?
I'm trying to grasp the whole thing but still very confusing.

Cheers

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Screen Pick with multiple Main Cameras?
« Reply #9 on: November 20, 2013, 11:26:25 PM »
Hi,

 You use this to define what camera will be used to do ray casting. That's all there is to it. it simply swith the "MainCamera" tag between two cameras.

 this action only works if you target a gameobject that has a camera and that is ot currently the main camera.

 If you still have problems, let me know.

 Bye,

 Jean