-
How do you make a simple AI that follows you and faces you?
I've been looking around for a while and I can't seem to find a tutorial this is the last thing I need for my fps for some reason I can't figure it out so could someone post a link or explain if you know how? Btw I know how to get the AI to follow me but to face me is the tough part that I'm struggling with
-
Senior Member
Re: How do you make a simple AI that follows you and faces y
For following you can use an object positioning event, with the coordinates of the person (or weapon) + distance you want between the person and the object. (so just add a distance to the x/y/z coordinates and link that to the ope)
To face you, you have to use a camera (on, distance on lowest, following the person). Link the rotations of the camera with the ope and you are set to go.
The object you want to follow it, will have to be glued and you will have to rotate the objects in the glue group a bit if the pivot is not properly aligned with the front side to the person.
I don't know, if the object is moving maybe you can glue the camera together with the object. But I don't know if the camera still works then. Maybe you can let the camera move the same patch with the ope, but again, I'm not sure if that will work I only used it with a static object.
-
Senior Member
Re: How do you make a simple AI that follows you and faces y
This will help you for basic rotation (simplest & easiest way): https://docs.google.com/drawings/d/1...9zsJtUypw/edit [Just focus at the logic cards, camera and object(s) if you find the description irritating]
For the best way to move the enemy is by having the enemy constant in a physics-moving chrome ball like the FPS camera & force in the example tracks instead by absolute OPE like backlashgamez did.
There are also advanced enemy AI movements, like make the enemy jump when something obstructs it's way or only attacking your character when you're near him. If you're interested, just tell me and I'll help you.
I've done it myself.
-
Re: How do you make a simple AI that follows you and faces y
Thanks guys and as for complex movements like jumping and attacking I have a pretty good idea how to do it
The only thing that stumped me was the facing of the character but now that it's right in front of me it seems so simple lol