playMaker

Author Topic: [SOLVED] mouse pick  (Read 2946 times)

santelia

  • Junior Playmaker
  • **
  • Posts: 78
[SOLVED] mouse pick
« 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.
« Last Edit: April 25, 2012, 05:59:33 AM by santelia »

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: mouse pick
« Reply #1 on: April 24, 2012, 05:20:48 PM »
Hi, you can try using layers, i am not 100% sure this will fix your problem.

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Re: mouse pick
« Reply #2 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  :)
« Last Edit: April 25, 2012, 06:01:06 AM by santelia »