benson kan køre lige ud

This commit is contained in:
2024-04-11 15:31:37 +02:00
parent 0fd5c85faa
commit 85fd4af372
10 changed files with 178 additions and 8 deletions

View File

@@ -268,4 +268,11 @@ public class AgentController : Agent
var distanceToCheckpoint = Vector3.Distance(transform.position, closestPoint);
return distanceToCheckpoint;
}
private void OnCollisionEnter(Collision other) {
if (other.gameObject.tag == "Wall")
{
AddReward(-0.03f);
}
}
}