playMaker

Author Topic: AI and Y axis  (Read 1925 times)

richardh

  • Junior Playmaker
  • **
  • Posts: 97
AI and Y axis
« on: January 09, 2015, 08:49:42 AM »
Is is possible to create AI (in playmaker) that observes the Y axis? I've make a prefab of an NPC that basically looks for a gameObject and moves there. When he arrives, he rotates a bit and starts again. Now he can only look forward in the Z direction and look for objects in his ray path. I'm wondering if there is a way for him to look alonf the Y axis and when he sees a game object in front but above/below his current Y position to be able to go to the object (observing the path terrain)?

My current AI prefab only moves on flat surfaces. if you put a few bumps in his path he will try to get over them but eventually he up-ends and I have to fire the destroy and restart FSM.

I'm only experimenting but I'd like to create something AI entirely within Playmaker.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: AI and Y axis
« Reply #1 on: January 19, 2015, 02:57:27 AM »
Hi,

 yes, this will be a combination of raycasting and logic based on the result of the raycasting.

 so your starting point here is to fire a ray in the right direction ( from the player) and then deal with the results.

 Bye

 Jean