playMaker

Author Topic: raycast action  (Read 510 times)

Theran

  • Playmaker Newbie
  • *
  • Posts: 9
raycast action
« on: October 26, 2022, 05:07:20 AM »
Im trying to set it so my droid can shoot if he's on the ground. I set up this action to test it before I built a complete FSM. During the test he's on a totally flat surface with layer set to ground (9.) While in play mode Im watching the "Store Did Hit" and it always shows false. I thought if the raycast hit something with a collider (in this case the ground) it should change to true.

I assume I am misunderstanding how to set the fields. What do I need to change, please?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: raycast action
« Reply #1 on: October 26, 2022, 07:38:57 AM »
Hi.
Have you checked with the debug on if the line is hitting the floor?
Also double check layers.

Theran

  • Playmaker Newbie
  • *
  • Posts: 9
Re: raycast action
« Reply #2 on: October 26, 2022, 11:31:17 AM »
Hi.
Have you checked with the debug on if the line is hitting the floor?
Also double check layers.

The ray is passing thru the surface
I also did a second FSM to get the variable to double check and it also shows as false
« Last Edit: October 26, 2022, 11:34:31 AM by Theran »

Theran

  • Playmaker Newbie
  • *
  • Posts: 9
Re: raycast action
« Reply #3 on: October 26, 2022, 11:33:10 AM »
heres the layers

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: raycast action
« Reply #4 on: October 27, 2022, 01:52:38 AM »
hi.
i maybe your layer mask settings

i can only see that its set to 9 (mean you are checking 9 layers, not layer index 9)