playMaker

Author Topic: Focus on center of screen?  (Read 2651 times)

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Focus on center of screen?
« on: August 09, 2011, 06:23:13 PM »
I'm trying to setup an FSM that can detect which ever object is currently visible in the center of the screen under a gui cursor. With the intention of making an FSM that can cycle through materials. I can't figure out the combination of nodes to construct it though, has anyone done something similar?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Focus on center of screen?
« Reply #1 on: August 09, 2011, 06:54:01 PM »
There are quite a few samples in PlayMakerSamples\TestLab\GUI that deal with picking (e.g., MouseOverObjectGUI, MousePickCursor).

You can use Lock Cursor in the Set Mouse Cursor action to keep the cursor in the center of the screen (like in the NoExit sample). Or use Screen Pick with screen coordinates set to the center of the screen (0.5 if normalized).

For material cycling, take a look at PlayMakerSampes\TestLab\Material\MaterialEffects.
« Last Edit: August 09, 2011, 06:55:50 PM by alexchouls »

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Re: Focus on center of screen?
« Reply #2 on: August 09, 2011, 06:56:26 PM »
Thanks alot Alex I will check them out