playMaker

Author Topic: Trouble with Raycast  (Read 1627 times)

Cooler3D

  • Playmaker Newbie
  • *
  • Posts: 2
Trouble with Raycast
« on: July 23, 2015, 02:40:54 PM »
Hello!
I need litle help with playmaker. Link to project:
http://3-media.info/Creating_a_Turn-Based_Game.rar
I have some objects in Scene. Knight marked as Player. Enemy marked as Enemy. The Enemy has FSM, trouble in "Do I Face The Player Yet?" state. That state cant find Player. To find them i used raycast function. Dont worked:( Where is my fault?

P.s. sory for bad English.

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Trouble with Raycast
« Reply #1 on: July 23, 2015, 03:23:36 PM »
You need to give the Raycast a direction
Forward for example would be 0 0 1

That being said, I feel like for what you are doing you should figure out what tile the enemy is facing and if the Player is on that tile, not really through raycasts, though I guess that's just my opinion

Cooler3D

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Trouble with Raycast
« Reply #2 on: July 23, 2015, 04:29:56 PM »
Thank yoy for answer!