playMaker

Author Topic: Raycast Trouble - Loop Exeeded  (Read 979 times)

PixelSteel

  • Playmaker Newbie
  • *
  • Posts: 9
Raycast Trouble - Loop Exeeded
« on: February 08, 2018, 12:39:10 AM »
So whenever I fire a raycast, say at a fence, that hit detection is fired off to another state that has a debug.log with the comment being "Raycast Hit Fence."

However, it keeps debugging this comment every frame the character is raycasting to the fence, which caused the game to crash because I exceeded the loop.

How can I make the raycast send the transition only once every time the player walks in front of the fence?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Raycast Trouble - Loop Exeeded
« Reply #1 on: February 08, 2018, 02:08:17 AM »
Hi.
Not sure how you set up your game/fsms/states/actions, but you could place a trigger area in front of the fence and if you are within that area do the Raycast.