playMaker

Author Topic: How to setup Raycast line of sight?  (Read 1818 times)

Adam Z

  • Full Member
  • ***
  • Posts: 207
How to setup Raycast line of sight?
« on: August 15, 2014, 11:54:34 AM »
I would like an AI to emit one Raycast every few seconds within a certain angle, and if it hits a Player tag it would trigger an Event.  What would be the best way to set that up?

Thanks!

Adam Z

  • Full Member
  • ***
  • Posts: 207
Re: How to setup Raycast line of sight?
« Reply #1 on: August 18, 2014, 02:22:46 PM »
Anyone have any suggestions?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to setup Raycast line of sight?
« Reply #2 on: August 18, 2014, 03:03:31 PM »
The raycast action accepts a vector3 direction, you can use that to control where it points the raycast. Use the layer mask options to filter hits on your Player's layer and just use the hit event to fire an event.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D