convexSweepTest returns wrong hitpoint
Posted: Thu Apr 14, 2016 4:34 pm
I have run into a weird behaviour where performing a convexSweepTest with a btSphereShape and ClosestConvexResultCallback seems to randomly report a hit point far outside the volume of the convexSweepTest. For example sweeping from 0,0,0 to 0,-1,0 with a sphere shape with radius 0.5 , I would expect a hit point to be at most 1.5 from the origin of the sweep but i occasionally get hit points more than 40 units away. The behaviour seems to only manifest when the btBoxShape being cast against is rotated on multiple axis and an active rigidbody is near the convexSweepCast.
Iv written 150 line program that reliably reproduces the behaviour for me and pasted it here:
https://gist.github.com/ktfh/dc9c4d26ed ... ff9a98f1cd
example out put of program:
FRAME 864
EXPECTED MAX DISTANCE OF 2.450000 HITDIST 40.919411
FROM -55.299984,-12.355896,-22.308666
TO -55.299984,-14.355896,-22.308666
RADIUS 0.450000
HITPOS -18.377710,-9.365052,-39.692535
HITNORM -0.130778,0.990269,-0.047598
heres an image to visualize and video https://www.youtube.com/watch?v=tqga2pD-3pE
I also asked on github but I don't think issues get looked at often.
https://github.com/bulletphysics/bullet3/issues/596
Iv written 150 line program that reliably reproduces the behaviour for me and pasted it here:
https://gist.github.com/ktfh/dc9c4d26ed ... ff9a98f1cd
example out put of program:
FRAME 864
EXPECTED MAX DISTANCE OF 2.450000 HITDIST 40.919411
FROM -55.299984,-12.355896,-22.308666
TO -55.299984,-14.355896,-22.308666
RADIUS 0.450000
HITPOS -18.377710,-9.365052,-39.692535
HITNORM -0.130778,0.990269,-0.047598
heres an image to visualize and video https://www.youtube.com/watch?v=tqga2pD-3pE
I also asked on github but I don't think issues get looked at often.
https://github.com/bulletphysics/bullet3/issues/596