Playmaker Forum

PlayMaker News => General Discussion => Topic started by: PolyMad on May 29, 2019, 01:47:11 PM

Title: How do I do to cast a ray from where the user clicks with the mouse?
Post by: PolyMad on May 29, 2019, 01:47:11 PM
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.
Title: Re: How do I do to cast a ray from where the user clicks with the mouse?
Post by: jeanfabre on May 29, 2019, 11:43:08 PM
Hi,

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

Bye,

 Jean
Title: Re: How do I do to cast a ray from where the user clicks with the mouse?
Post by: PolyMad on May 31, 2019, 08:01:05 AM
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?
Title: Re: How do I do to cast a ray from where the user clicks with the mouse?
Post by: jeanfabre 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