in the following method:Object reference not set to an instance of an object.
Code: Select all
public bool RayCast(Ray ray, float maximumLength, IList<BroadPhaseEntry> entries)
{
hierarchy.root.GetOverlaps(ref ray, maximumLength, entries); // <------ HERE
return entries.Count > 0;
}
Code: Select all
BEPUphysics.Entities.Prefabs.Box box = new BEPUphysics.Entities.Prefabs.Box(Vector3.Zero, 1, 1, 1);
space.Add(box);
space.Remove(box);
if (space.RayCast(new Microsoft.Xna.Framework.Ray(cursorRay.Origin, cursorRay.Direction), 1000.0f, results))
// error