Sweep Test with Rotation is not working

shotgun
Posts: 3
Joined: Mon Jun 09, 2008 10:37 pm

Sweep Test with Rotation is not working

Post by shotgun »

I'm trying to find the tangent point from a character's position to the side of any arbitrary shape in the world at a certain height.

To do this, I am using the btCollisionWorld's

Code: Select all

convexSweepTest
to sweep a long cylinder along a circular path until it hits a certain object. However, I'm getting fairly bad results. I've posted several pictures of the problem I'm having. I'm happy to post code as well if you think it would help. Accuracy is more important than speed for this problem, so I'd be happy to make a duplicate

Code: Select all

btCollisionWorld::objectQuerySingle
that was more accurate if that's possible.

I've tried many different things including changing the sweeping cylinder radius, length, center point and starting position, and some have helped but it all seems a little arbitrary. Is this a known problem? Is there something I can do? I'm happy to attach code if you want, but I think the pictures are worth a thousand chars :)
You do not have the required permissions to view the files attached to this post.
shotgun
Posts: 3
Joined: Mon Jun 09, 2008 10:37 pm

Re: Sweep Test with Rotation is not working

Post by shotgun »

Oh I just noticed that in the new SDK Erwin added a penetration depth test to the convexSweepTest. Perhaps this will fix the issues I'm having. I'm now downloading and looking into the new code.
shotgun
Posts: 3
Joined: Mon Jun 09, 2008 10:37 pm

Re: Sweep Test with Rotation is not working

Post by shotgun »

Ok, so using the penetration solver worked (fancy that). It comes with the 2.69 bullet. However it crashes immediately because it has no stack allocator. So I made a temporary one, but I assume this is a pretty bad way to do it, so it is probably best to pass the program's stack allocator through all of the various necessary functions, but I'd like to know if this is really necessary first. Erwin?