Ejemplo n.º 1
0
        public void UpdateFromDelta()
        {
            if (!Object1.IsStatic)
            {
                // Vector2 fakeVelocity1a = Object1.Delta.FinalPosition - Object1.Position;
                Vector3 fakeVelocity1 = Object1.Delta.FinalVelocity * deltaTime;
                Object1EntryTime = Resolver.Sweep(Object1.GetCollider(), Object2.GetCollider(), fakeVelocity1, out Object2Normal);
            }
            else
            {
                Object1EntryTime = 1f;
            }

            if (!Object2.IsStatic)
            {
                //Vector2 fakeVelocity2a = Object2.Delta.FinalPosition - Object2.Position;
                Vector3 fakeVelocity2 = Object2.Delta.FinalVelocity * deltaTime;
                Object2EntryTime = Resolver.Sweep(Object2.GetCollider(), Object1.GetCollider(), fakeVelocity2, out Object1Normal);
            }
            else
            {
                Object2EntryTime = 1f;
            }
        }