Hi,
I’m trying to implement a system where by, when an enemy is waiting to attack the player it will strafe in a random direction while waiting, just so I don’t have it standing like a statue in between attacks. At the moment I can make random locations on the mesh for it to move too, however it always faces the location as it moves rather than keeping fixed on the player which is what I want. When I try and use something like ai.Body.transform.LookAt(player), to try keep it focused on the player it ends up moving around the player in a circle and doesn’t actually go to the right locations set. Is there some way of separating say, the AI so it is attached to a game object and has the enemy as a child object so the two are free to rotate independently? Its something I tried out but as my animations use root motion the two objects seem to move at different speeds and it gets messed up. Any help would be appreciated.
Reagards,
Kevin