edited August 2017 in Makinom Support
In the ork move ai, I really like the sight angle option where you can decide on the angle that the enemy will detect you. Gil, how would you do such a thing in makinom? I already created an enemy boss schematic movement where he moves around and attack me on sight. Works really well. Now I just need him to chase me when Im actually in sight, not when Im behind him.
How would I add into the boss movement schematic to make it so? Is it using the raycast node or something? :)
What I did is shoot out 20 rays per monsters every update to check if they touch the player. I test it by having 10 enemies in an empty scene. Upon play, it works. I can even hide behind walls and not have them detect me. Just the thing is that my framerate drops quite a bit.
Post edited by Shadow_Fire on
  • You can use the Check Angle node for the same functionality, i.e. to only detect the player when within a certain distance and field of view, you'd first use a Check Distance node and a Check Angle node afterwards (when distance check succeeds). You could additionally send a raycast from the user to the player afterwards to check if there's a wall between them :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2017
    Ah last time I did tried adding a check angle node, but it just worked weirdly. After seeing your message, I went back and tried it again. I enabled absolute value and tadaa, it works now.
    The check distance and angle work beautifully together. Thanks!
    Though I've hit a wall :)
    Shooting a raycast from the enemy to the player doesn't seem to work. When I do that, it seems like the enemy only shoots a ray to a direction on his left side. So yeah, in order for the enemy to "see" me, I will have to go there, even though the raycast was supposed to shoot it from him directly to my player when I enter his sight angle.
    Post edited by Shadow_Fire on
  • Can you post the details of your raycast setup?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2017
    http://imgur.com/a/ZT3vO

    I tried it with root enabled and disabled in the player's Use Root.
    Post edited by Shadow_Fire on
  • Well, you're using it wrong :D
    Your current setup uses the player's position as a direction - change the Raycast Origin to Value Position, which allows you to set up the start and end of the raycast, i.e. using the machine object's position as Start Position and the player's position as Target Position.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Oho, no wonder it didn't work at all for me :)
    Got it working as intended now. Thanks a lot, GiL!
Sign In or Register to comment.