Raycasting from Inside Shapes?

Jun 17, 2010 at 3:54 PM
I've noticed that raycasts originating inside a shape won't collide with that shape. Is there some way to prevent this? In my game I allow players and enemies to overlap but bullets should still hit enemies even if they originate inside them. Thanks, Dan
Jun 19, 2010 at 5:55 PM

Here's a similar post from Box2D forum:  http://www.box2d.org/forum/viewtopic.php?f=4&t=4506&p=21526&hilit=raycast+inside+shape#p21526

Looks like the original poster worked around it by doing a distance check.  You may find other information about the problem on that forum, but it is by design behavior in terms of Box2D.