playMaker

Author Topic: Get Raycast Hit Info doesn't work  (Read 3855 times)

dmitry

  • Playmaker Newbie
  • *
  • Posts: 2
Get Raycast Hit Info doesn't work
« 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?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Get Raycast Hit Info doesn't work
« Reply #1 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...


yezzer

  • Playmaker Newbie
  • *
  • Posts: 24
    • Follow me on Twitter
Re: Get Raycast Hit Info doesn't work
« Reply #2 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.
Freelance games & App developer using Unity3D, Flash & Adobe AIR for web, iOS, & Android. Interested in AR & other emerging tech.
@yezzer

Padenlee

  • Junior Playmaker
  • **
  • Posts: 63
  • You can't hit what you don't shoot for!
Re: Get Raycast Hit Info doesn't work
« Reply #3 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!!
-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone

metakid

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Get Raycast Hit Info doesn't work
« Reply #4 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.