Beispiel #1
0
        public override RaycastResult DoRayCastExcludingGround(Ray ray)
        {
            var raycastResult = new JitterRaycastResult(collisionSystem, ray);

            if (raycastResult.Found)
            {
                foreach (JitterBody body in bodies)
                {
                    if (body.Body == raycastResult.RigidBody)
                    {
                        raycastResult.PhysicsBody = body;
                    }
                }
            }
            return(raycastResult);
        }
Beispiel #2
0
		public override RaycastResult DoRayCastExcludingGround(Ray ray)
		{
			var raycastResult = new JitterRaycastResult(collisionSystem, ray);
			if (raycastResult.Found)
				foreach (JitterBody body in bodies)
					if (body.Body == raycastResult.RigidBody)
						raycastResult.PhysicsBody = body;
			return raycastResult;
		}