There aren’t transparent children in the object, there is one part over shadowing another part, is there a way to for the ray to go through the part without needing to cast another ray entirely?
There is a part in front of another part, not in models, descendants, children there are two parts in workspace one is over shadowing another, is there a way to cast one ray that goes through that part?
See, did you read my reply at the top, it’s just in front not inside a model, etc
Don’t know if anyone has mentioned this yet, but you can set the transparent parts to a different collision group.
Then set the ray to a separate collision group by using RaycastParams.CollisionGroup, and this group has collisions turned off with the transparent parts collision group.
you’re not understanding what Im trying to say. If you set the IgnoreDescendantsList to that part (or all transparent ones, your choice)
then the ray will go THROUGH that part by default, it will ignore it, you have to do nothing else than assigning IgnoreDescendantsList appropriately.
No matter if its inside the model or outside it will be ignored and the ray will go through.
Yes, I know that, but when it’s added to the filter i need to cast another ray, because the first ray has already hit something. That’s how you got the transparent object, in the first place.
no you dont, the ray will NOT hit that part at all (if you set the filter BEFORE casting the ray which is how it should be done in all cases)…
the ray will continue moving as if that part never existed
ray casts are instantaneous, the chance that the part will be deleted/created while the ray is being cast is negligible so you should be fine. The collision group method also works
Not deleted while the ray is casting, I mean if the part doesn’t exist. There is nothing to add to the filter, but it’s fine, I’ve got the solution provided by @amadeupworld2