Hello,
I use a nav mesh agent to move my jellyfish, but the problem is that when my jellyfish move to her destination her transform parameters are modified without reason. I dunno what is causing this and i need some help.
Thank you in advance !
Hello,
I use a nav mesh agent to move my jellyfish, but the problem is that when my jellyfish move to her destination her transform parameters are modified without reason. I dunno what is causing this and i need some help.
Thank you in advance !
I think that my problem come from my navmesh LookAt. How can I change only the y axis of my LookAt?
void Chase()
{
pos_Nav.LookAt(PlayerDetect.transform.position);
agent.SetDestination(PlayerDetect.transform.position);
}
I’ve resolved my problem,
here is my code ^^
void Chase()
{
Vector3 targetPos = new Vector3(PlayerDetect.transform.position.x, transform.position.y, PlayerDetect.transform.position.z);
transform.LookAt(targetPos);
agent.SetDestination(PlayerDetect.transform.position);
}