playMaker

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

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
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: 14237
  • Official Playmaker Support
    • View Profile
Hi,

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

Bye,

 Jean

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
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: 14237
  • Official Playmaker Support
    • View Profile
Re: How do I do to cast a ray from where the user clicks with the mouse?
« Reply #3 on: June 05, 2019, 12: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