playMaker

Author Topic: Raycast and Has Object  (Read 2551 times)

dota

  • Playmaker Newbie
  • *
  • Posts: 4
Raycast and Has Object
« on: July 21, 2013, 09:59:40 AM »


I have the same problem, like this video http://www.youtube.com/watch?v=qpXDCEuuTJ4. State with "Has Component" - can not determine rigidbody and any other component...Raycast work, I need to identify the object to the component or tag ... How to do it? Help me please! :-\

dota

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Raycast and Has Object
« Reply #1 on: July 21, 2013, 10:06:08 AM »
He does not see the component. and can not recognize it

dota

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Raycast and Has Object
« Reply #2 on: July 21, 2013, 02:30:41 PM »
can somebody help me?

dota

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Raycast and Has Object
« Reply #3 on: July 22, 2013, 02:28:07 AM »
Very responsive community:)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Raycast and Has Object
« Reply #4 on: July 29, 2013, 03:13:39 AM »
Hi,

Is it your video or did you find it because you have the same problem?

-- first you need to address your infinite loop. I can see a warning stating that you have an infinite loop in there.

 it's because there is no object being hit: the fsm variable objecthited is null if you look at the action interface in the second attempt, where in the first attempt, objecthited is equal to "Cube".

So, the issue could be that you reset the objectHited variable maybe?

If you want to send me the project, simply pm me. Else can you post screenshots of your fsm? and especially what is done on "act" state.

BUT, first you need to address this infinite loop issue, that's also likely a source of issues.

bye,

Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Raycast and Has Object
« Reply #5 on: July 29, 2013, 03:18:59 AM »
Hi,

 also, please find a revised version of hasComponent that will not fire an error. It doesn't addres the inifite loop, so be prepared that other problems may arise further down the road if you still have an infinite loop warning.

http://hutonggames.com/playmakerforum/index.php?topic=4524.0

Bye,

 Jean