The test setup is a simple floor represented by a box shape. The particles are emitted a bit over the floor and drop down accelerated by gravity. As this log shows well ray testing fails to see a collision as it should:
Code: Select all
II [Bullet] step particle 0: elapsedTime=0.004637 displacement=(0.00019719, -0.020583, 0.00463185)
II [Bullet] rayTest: position=(0.019133, 0.00600426, 0.44942) to(0.0193302, -0.0145788, 0.454052)
II [Bullet] no hit: pos=(0.0193302, -0.0145788, 0.454052)Code: Select all
box shape:
- position ( 15, -0.2, -5 )
- half extends ( 26, 0.2, 26 ) // hence half the size
particle starts at:
- position ( 0, 1, 0 )
- gravity ( 0, -9.81, 0 )As a counter example here the situation when the ray cast does find a collision. Same situation with the same starting position of the particle:
Code: Select all
II [Bullet] step particle 0: elapsedTime=0.005344 displacement=(-0.000382682, -0.0235808, 0.00532798)
II [Bullet] rayTest: position=(-0.0320416, 0.0178012, 0.446106) to(-0.0324243, -0.00577959, 0.451434)
II [Bullet] has hit: normal=(0.000238988, 1, -0.000162395) hitPoint=(-0.0320885, 0.014913, 0.446759) hitFraction=0.451434EDIT:
Also for the first particle missing the box here the test around the location the second particle did score a collision for comparison:
Code: Select all
II [Bullet] step particle 0: elapsedTime=0.004646 displacement=(0.000197573, -0.0204116, 0.00464084)
II [Bullet] rayTest: position=(0.0189355, 0.0264159, 0.444779) to(0.019133, 0.00600426, 0.44942)
II [Bullet] no hit: pos=(0.019133, 0.00600426, 0.44942)