Ejemplo n.º 1
0
 private void FixedUpdate()
 {
     foreach (var sphere in entityHandler.spheres)
     {
         sphereCollider.CheckForCollision(sphere);
     }
     foreach (var plane in entityHandler.planes)
     {
         planeCollider.CheckForCollision(plane);
     }
     if (Moving())
     {
         velocity += Acceleration * Time.fixedDeltaTime;
     }
     transform.position += velocity * Time.fixedDeltaTime;
 }