Very short Raycasts sometimes fail

Post Reply
JanK
Posts: 17
Joined: Fri Jan 08, 2010 11:40 am

Very short Raycasts sometimes fail

Post by JanK » Sun Feb 19, 2012 9:45 pm

Hi

I am using Bullet to do lots of raycasts against static objects.

Currently I have exactly one static box shape in my scene.

When I make raycasts of length 0.2 everything works as expected. However, usually I want to make raycasts of length 0.1. When I do that, roughly 1% of the raycasts that should report an intersection with the box, don't.

Is this a known problem? Could I be doing something wrong?

I was thinking that maybe if the raycast starts within very close proximity of an object, it might ignore that object entirely (due to skin-width or something). But so far I haven't found out how I could actually set an object's skin-width.

Additionally a general question: If a raycasts starts from within an object, is the object ignored ?

Thanks,
Jan.

kloplop321
Posts: 55
Joined: Sun Jan 01, 2012 7:37 pm

Re: Very short Raycasts sometimes fail

Post by kloplop321 » Sun Feb 19, 2012 10:15 pm

This might have to do with the margins on shapes, but I'm not sure.

Is the % consistent? Like if you run it with the exact same scene multiple times, do you get the same results?

Your last question would definitely be handy to know.

JanK
Posts: 17
Joined: Fri Jan 08, 2010 11:40 am

Re: Very short Raycasts sometimes fail

Post by JanK » Mon Feb 20, 2012 8:44 am

The percentage is a guessed value. I would assume that it just depends on my exact scene setup (which is randomized).
However, if I use the exact same scene than I see the exact same errors, so in that regard it is consistent.

Post Reply