hey peoples, i am using unity standard asset AI Character Control asset but i am facing some problems with that. Basically the problem is when i am trying my character to move on the slopes it just ignore that and passes the collider even without getting stoped.
the codes i am using are listed below :
private void FixedUpdate()
{
if (target != null)
{
if (current_pos_id < target.Count)
{
agent.SetDestination(target[current_pos_id].position);
}
else
character.Move(Vector3.zero, false, false);
}
if (agent.remainingDistance > agent.stoppingDistance)
{
character.Move(agent.desiredVelocity, false, false);
}
else
{
if(character.transform.position.y != target[current_pos_id].position.y)
{
character.transform.position = new Vector3(character.transform.position.x, target[current_pos_id].position.y, character.transform.position.z);
}
Debug.Log("character " +character.transform.position);
Debug.Log("ideal "+target[current_pos_id].position);
current_pos_id++;
}
}
can anyone help to solve this problem
Thankyou