is that correct that raycast cannot return which element of a body has been detected along the ray/line ?
i’m trying the example from the doc that works fine except it cannot find out which element so i receive a hit for one object multiple times for each of the element of a body.
for i,v in ipairs( hits ) do
print( "Hit: ", i, v.object, v.object.myName,v.object.ip,
well, right now indeed it’s only to avoid getting multiple hits on the same object , but i’m sure there will be sometime where it would be very valuable to know which element !
In this case, I suppose you could gather all hits and “log” them (their data) in a temporary container table or similar. Then after a very short timer (like 10-50 milliseconds), loop through that table and take the proper action on the first, then break the loop so it doesn’t process any of the others. This way you should at least minimize the number of hits on the object to just one.
well, right now indeed it’s only to avoid getting multiple hits on the same object , but i’m sure there will be sometime where it would be very valuable to know which element !
In this case, I suppose you could gather all hits and “log” them (their data) in a temporary container table or similar. Then after a very short timer (like 10-50 milliseconds), loop through that table and take the proper action on the first, then break the loop so it doesn’t process any of the others. This way you should at least minimize the number of hits on the object to just one.