My character run through the wall in high speed

Post Reply
zyzyandzyzy
Posts: 9
Joined: Mon Aug 27, 2012 8:10 am

My character run through the wall in high speed

Post by zyzyandzyzy » Mon Aug 27, 2012 8:17 am

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

khoowaikeong
Posts: 43
Joined: Fri Jun 15, 2012 7:11 am

Re: My character run through the wall in high speed

Post by khoowaikeong » Mon Aug 27, 2012 9:22 am

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.

zyzyandzyzy
Posts: 9
Joined: Mon Aug 27, 2012 8:10 am

Re: My character run through the wall in high speed

Post by zyzyandzyzy » Mon Aug 27, 2012 9:42 am

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 :(

songsofgrazier
Posts: 5
Joined: Fri Oct 12, 2012 3:51 am

Re: My character run through the wall in high speed

Post by songsofgrazier » Fri Oct 12, 2012 3:54 am

you can see the App_CcdPhysicsDemo,
it shows how to deal with the high speed objects

morando
Posts: 9
Joined: Wed Jun 27, 2012 7:51 am

Re: My character run through the wall in high speed

Post by morando » Tue Oct 23, 2012 12:02 pm

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.

Post Reply