Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: santelia on April 24, 2012, 03:03:51 PM

Title: [SOLVED] mouse pick
Post by: santelia on April 24, 2012, 03:03:51 PM
Hi again. Beside a sci-fi door I have a numeric keyboard to enter a passcode. The keyboard has its own display. Each key has a mesh collider and a FSM. The fsm uses Mouse Pick Event (set to every frame) and sends an event on Mouse Down. That event activates a state where a key sound is played (play sound) and a number is written (Set Visibility) on the display. My problem is that the FSM never detects the Mouse Pick Event. It remains freezed on the Mouse Pick Event state. I suspect that it can be caused by a wrong Ray Distance. Since I have no idea of the ray distance to use, I am trying various lenght, but nothing changes. And nothing happens also if I set a very long ray distance (10000 or more). How can I get the right ray distance to use? Is it the problem or I am probably forgetting something else? Ho can I solve that? Best if using only PlayMaker.
Title: Re: mouse pick
Post by: elvis75k on April 24, 2012, 05:20:48 PM
Hi, you can try using layers, i am not 100% sure this will fix your problem.
Title: Re: mouse pick
Post by: santelia on April 25, 2012, 05:58:59 AM
Definitely, it was a matter of layers. Put the keyboard on a layer dedicated to ray operations, then on FSM Mouse Pick Event action set layer mask to 1 and specified that layer. Now it works. Thank you Elvis  :)