private object AsLocation(UUID reg, Vector3 position) { SimRegion r = GetRegion(reg); if (position == Vector3.Zero) { if (r == null) { if (reg == UUID.Zero) { return(SimHeading.UNKNOWN); } return(SimHeading.UNKNOWN); // return r; } return(r); } return(new SimHeading(r.GetPathStore(position), position, Quaternion.Identity)); }