playMaker

Author Topic: How do I do to cast a ray from where the user clicks with the mouse?  (Read 1686 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 545
As per title: I have no idea.
Checked some actions, but can't understand how to use the screen coordinates of the mouse pointer as the starting point of the raycast.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

Did you try MousePick? it works straight away for me.

Bye,

 Jean

PolyMad

  • Hero Member
  • *****
  • Posts: 545
I see there are Mouse Pick and Mouse Pick Event actions.
What if I need both in one action?
I mean, when the user clicks, I need to store the point where he clicked AND move onto another state.
If I use first the Mousepick Event and Mouse Pick after, to get to the new state, will it SURELY work, even if the click is very very quick?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do I do to cast a ray from where the user clicks with the mouse?
« Reply #3 on: June 05, 2019, 03:14:44 AM »
Hi,

I think you are over thinking this. you can use mousepick and check the result and then send an event, or use mousepick Event and then operate upon the sent event. Using both in the same state will mean that one is executed before the other, that should work also, there is no reason why.

Bye,

 Jean