Hi guys, i feel like i’m missing something here… I can’t quite work it out.
This ray is cast from 0,0,0 to 10,0,0. but it intersects with box_a at -5,0,0 …
box_a is the first mesh created in the scene, but surely it shouldn’t be hit by the ray…?
If i remove box_a from the scene, the ray intersects with box_b at 10,0,0 - but i think it should be stopped by the plane at 5,0,0 ?
https://www.babylonjs-playground.com/#KNE0O#158
Console.logs;
/with box_a
..new ray cast..
origin e {x: 0, y: 0, z: 0}
target e {x: 10, y: 0, z: 0}
direction e {x: 1, y: 0, z: 0}
hit BOX_NOT_IN_RAY_DIRECTION e {x: -5, y: 0, z: 0}
/without box_a, but still with "wall" (plane at 5, 0, 0)
..new ray cast..
origin e {x: 0, y: 0, z: 0}
target e {x: 10, y: 0, z: 0}
direction e {x: 1, y: 0, z: 0}
hit BOX_IN_RAY_DIRECTION e {x: 10, y: 0, z: 0}