reactphysics3d icon indicating copy to clipboard operation
reactphysics3d copied to clipboard

Missing ray collision test.

Open DJLinux opened this issue 7 years ago • 1 comments

(sorry about my bad English)

So far I know a Ray are defined by position and direction (normalized) but in reactphysics3d all collision tests used a start and end point. So it looks more a line or segment collision test.

I would like to have a real ray collision test also.

Thank you. DJ

DJLinux avatar Nov 20 '18 00:11 DJLinux

Hello,

Yes, I could use a starting point and a maximum distance (that could be infinity) instead of two points for the ray casting. However, it should not be really hard to compute a end point at the boundary of your world right ?

Specifying the boundary of your ray is better because only the bodies inside the AABB of your ray segment will be tested for ray casting and this can speed up the test.

Thanks for your feedback.

DanielChappuis avatar Nov 21 '18 09:11 DanielChappuis