ok i have a ai or what ever you want to call it it moves on its own i want to know how to make it track my player to were it folows how can i do that
use trackTo (editObject) Actuator. This might be the simpliest way
ok what happens it the charecter gets truned around for some reason and it wont rotate or is that because i have to have that animation in order for him to do that cause right now the track to object completely sucks.
This is where you need to be a little inventive. Add a logic sensor that triggers when the AI can’t see the player (invert it). Attach that sensor to logic making the enemy turn, “looking” for the player. As soon as the player is in sight, voila! The enemy will continue on its old logic.
ok is there away some one can give me a screen shot of this or a tutorial on it cause iam completely lost.
Just a sec.
Simple Example.blend (426 KB)
Look at the logic to get the idea. The red block will track the blue, even if you press ‘w’ or ‘s’. However, if you seak past the red block, it will turn slowly to “look” for the blue, until it the blue block is seen.
ok i looked at the blend its a good idea but how can i apply that to a modle that i have cause it has rig that i need to apply and have it walk around?
if it helps i can post the blend file for it
If you do so, I could see more. Still, most of the logic would look similar, with just the additions of the rig.
ok i ll put the blend file up
so would i just add the action
It doesn’t work that Way, usually. Your Rig/Armature shall be parented to a Cube that is used as Collision Box for the whole Player/Enemy and apply the TrackTo Logic to that Collision Box. So you will use Cubes anyway.
so i got him to move around with the animation but he just moves in circles and i have no clue what your talking about it would help if you attached a excample
Okay, lets look at your logic here (a screen-shot of this may help)
- Is the ray senor long enough to “see” the object?
- Is the ray function looking for a property that the object it tracks has?
- Does the object you want to track have that property?