Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: dmitry on April 09, 2012, 01:33:07 PM

Title: Get Raycast Hit Info doesn't work
Post by: dmitry on April 09, 2012, 01:33:07 PM
I put Raycast action and after it  Get Raycast Hit Info with references to Game Object Hit and Distance.

However, when I run it, then Get Raycast Hit Info best greyed out and it doesn't set anything into Game Object Hit and Distance.

Could anyone help please?
Title: Re: Get Raycast Hit Info doesn't work
Post by: Alex Chouls on April 11, 2012, 12:23:39 AM
When an action is greyed out, it means it's finished running. Get Raycast Hit Info fires once, then finishes. Typically a Raycast would trigger a transition to a new state where you get more info on the hit, then do something with that info (e.g., spawn an object at the hit point).

However, you have it setup in the same state as the Raycast. To work like this, the action would need an Every Frame option to keep running. I'll add that for this use case...

In the meantime, you can use a Next Frame Event to loop the state.

I'm not at my computer right now, so can't make a screenshot, but let me know if you need one...

Title: Re: Get Raycast Hit Info doesn't work
Post by: yezzer on June 24, 2012, 08:21:48 AM
Is this going to get an Every Frame event? For now, I'll try using a Next Frame Event as you suggest.
Title: Re: Get Raycast Hit Info doesn't work
Post by: Padenlee on August 22, 2012, 10:55:19 AM
Bump bump!  Just ran into this problem.  I think it got forgot.  Just a reminder guys!  Playmaker is still just as awesome, but this is needed!!
Title: Re: Get Raycast Hit Info doesn't work
Post by: metakid on December 27, 2012, 04:06:12 PM
Bumpus. Could really do with Every Frame here, am trying to control camera focal distance with a raycast, sending events between states seems clunky for what I need.

Thankz.