The problem showed on this picture:
Needed block - brown
A and D - start points.
After raycasting from A to D i receive B, After raycasting from D to A i receive C.
The problem showed on this picture:
Needed block - brown
A and D - start points.
After raycasting from A to D i receive B, After raycasting from D to A i receive C.
Check if the hit part is that green-outlined part, if it is then ignore the result.
I can’t do this, due to target of code. Script should create wirebox of parts, so They should be connected together, but only if there not block between that 2 dots.
I’m a bit confused on what your actually asking tbh. Is the problem that the raycast origin point is within the bounds of the green outlined part? If so the part will be ignored by the raycast.
Raycast ignores the part it starts in so it’s not a bug. B and C are technically inside the block so it gets ignored.