Ray lunching
Hey everyone,
I am using ReferenceIntersector FindNearest method, whan i am "Hitting" a wall i get the excpected reference and location. but whan i am "Hitting" a window the ray is passing thorow the window.
Any idea what the reason is?
//creating a list of category
IList<BuiltInCategory> categories = new List<BuiltInCategory>();
categories.Add(BuiltInCategory.OST_Walls);
categories.Add(BuiltInCategory.OST_Doors);
//Creating new elmentcatgory filter
ElementMulticategoryFilter filter = new ElementMulticategoryFilter(categories);
//getting the reference
ReferenceIntersector refI = new ReferenceIntersector(filter, FindReferenceTarget.All, view3d);
ReferenceWithContext refC = refI.FindNearest(lunchingLocation, rayDiraction);
Link copied