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
My character run through the wall in high speed
-
- Posts: 9
- Joined: Mon Aug 27, 2012 8:10 am
-
- Posts: 43
- Joined: Fri Jun 15, 2012 7:11 am
Re: My character run through the wall in high speed
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.
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.
-
- Posts: 9
- Joined: Mon Aug 27, 2012 8:10 am
Re: My character run through the wall in high speed
OK, seems I need to limit the impulse and increase the bullet calculation times.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.
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
-
- Posts: 5
- Joined: Fri Oct 12, 2012 3:51 am
Re: My character run through the wall in high speed
you can see the App_CcdPhysicsDemo,
it shows how to deal with the high speed objects
it shows how to deal with the high speed objects
-
- Posts: 9
- Joined: Wed Jun 27, 2012 7:51 am
Re: My character run through the wall in high speed
I have a questions regarding this since i have similar issue.
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.
Code: Select all
dynamicsWorld->getDispatchInfo().m_useContinuous = true;
...
body->setCcdMotionThreshold(0.1f);
body->setCcdSweptSphereRadius(0.3f);
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.