Пример #1
0
        private static IEnumerable <TrackEvent> FindSigns(EquiPointSet.Point point)
        {
            var hits = Physics.RaycastAll(
                new Ray((Vector3)point.position + WorldMover.currentMove, point.forward),
                (float)point.spanToNextPoint,
                1 << SIGN_COLLIDER_LAYER);

            foreach (var hit in hits)
            {
                var  dp        = Vector3.Dot(hit.collider.transform.forward, point.forward);
                bool direction = dp < 0f;
                foreach (var trackEvent in ParseSign(hit.collider.name, direction, point.span + hit.distance))
                {
                    yield return(trackEvent);
                }
            }
        }
Пример #2
0
 public static float Grade(EquiPointSet.Point point)
 {
     return(Mathf.RoundToInt(point.forward.y * 200) / 2f);
 }