Gameplay improvement
This commit is contained in:
@@ -71,13 +71,13 @@ public class AIController : MonoBehaviour
|
||||
inputs[AiInputs.VERTICAL] = 1;
|
||||
}
|
||||
|
||||
Debug.DrawRay(transform.position, transform.TransformDirection(-Vector3.forward) * 8, Color.magenta, 0, false);
|
||||
|
||||
inputs[AiInputs.HORIZONTAL] = Mathf.Floor(this.angleToDestination * 10) / 10;
|
||||
if (this.distanceToTarget < this.turnRadius)
|
||||
{
|
||||
inputs[AiInputs.HORIZONTAL] = Mathf.Floor(-this.angleToBall * 10) / 10;
|
||||
Debug.DrawRay(transform.position, transform.TransformDirection(-Vector3.forward) * 10, Color.magenta, 0,false);
|
||||
if (Physics.Raycast(transform.position, transform.TransformDirection(-Vector3.forward), 10))
|
||||
if (Physics.Raycast(transform.position, transform.TransformDirection(-Vector3.forward), 8))
|
||||
{
|
||||
inputs[AiInputs.BOOST] = 1;
|
||||
}
|
||||
@@ -85,6 +85,7 @@ public class AIController : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (this.distanceToBall < this.turnRadius)
|
||||
{
|
||||
RaycastHit hit;
|
||||
|
||||
Reference in New Issue
Block a user