Page 1 of 1

My character run through the wall in high speed

Posted: Mon Aug 27, 2012 8:17 am
by zyzyandzyzy
Hi

I'm working on a racing game with quite traditional scene, I have a main character and track.
I'm now testing my game using box shape for my character, and btScaledBvhTriangleMeshShape for track wall. The problem is when my character move in a relatively high speed and touch the side wall, it can go through it :( I've tested the shape is correct and it works perfectly when the speed is low.
I haven't looked into bullet codes, and my guess is the character crossed the wall between 2 collision calculation, but I don't know how to avoid it.
Anyone pls help ~

Thanks in advance,
-Yi

Re: My character run through the wall in high speed

Posted: Mon Aug 27, 2012 9:22 am
by khoowaikeong
if you can, thicker wall,
if you can't limit the max impulse.

i think bullet support quite a few other tricks to deal with this,
but i better let the expert advice on those advance technique.

Re: My character run through the wall in high speed

Posted: Mon Aug 27, 2012 9:42 am
by zyzyandzyzy
khoowaikeong wrote:if you can, thicker wall,
if you can't limit the max impulse.

i think bullet support quite a few other tricks to deal with this,
but i better let the expert advice on those advance technique.
OK, seems I need to limit the impulse and increase the bullet calculation times.
And I don't know what do you mean by thinker the wall, if I create a box to represent the wall, there's still a chance the character can go through the first plane and stuck in the wall :(

Re: My character run through the wall in high speed

Posted: Fri Oct 12, 2012 3:54 am
by songsofgrazier
you can see the App_CcdPhysicsDemo,
it shows how to deal with the high speed objects

Re: My character run through the wall in high speed

Posted: Tue Oct 23, 2012 12:02 pm
by morando
I have a questions regarding this since i have similar issue.

Code: Select all

dynamicsWorld->getDispatchInfo().m_useContinuous = true;
...
body->setCcdMotionThreshold(0.1f);
body->setCcdSweptSphereRadius(0.3f);
1. Motion threshold is a minimum speed of a body per step when it should use CCD?
2. Sphere radius should be like radius of a bounding sphere for this body shape?
3. I need to set m_useContinuous for above methods to work?

Thank you for your time.