Open GoogleCodeExporter opened 9 years ago
Thanks. I'll setup a test-case to try out the problem. Have you tried enabling
continuous collision detection (ccd) on the bodies (e.g.
http://bulletphysics.org/mediawiki-1.5.8/index.php/Anti_tunneling_by_Motion_Clam
ping)
Original comment by xexu...@gmail.com
on 13 Aug 2012 at 7:45
Thanks for your request.
When you create your ball i set the parameters for his body:
mBallRadius = 0.95f;
mNewGeneratedBallBady.SetCcdSweptSphereRadius(mBallRadius);
mNewGeneratedBallBady.SetCcdMotionThreshold(mBallRadius);
This is correct?
Original comment by stm.p...@gmail.com
on 13 Aug 2012 at 9:45
What is the size of your ball object, and at what sort of speeds does it travel?
there are two values here -
ccdMotionThreshold - if your object moves more than this value in a single
update frame then the ccd tests will be done. (a value of 1 with a
stepSimulation value of 60 would mean that ccd will be done if your object is
moving at 60m/s)
ccdSweptSpehereRadius - this is an extra margin added to your object for the
ccd checks, for an object of size 1 a value of 0.2 is recommended.
If you can attach more of your code it will help me to create a test bed.
Thanks.
Original comment by xexu...@gmail.com
on 13 Aug 2012 at 10:36
I could not fix the error. I send you my code.
Original comment by stm.p...@gmail.com
on 15 Aug 2012 at 7:16
Attachments:
Ok,
I'm trying to just check what you've sent. One thing that looked a bit strange
was your initial creation of the physics world in SlayerTable
PhysicsManager.CreateWorld(new Vector3(0, -9.81f * 20f, 9.81f * 8f), 1.0f, 5,
1.0f / 200.0f);
is it correct that you're after a gravity force of 20G downwards and 8G along Z
?
also a simualation rate of 200fps seems high?
Is the bvh the border of the pachinko machine? does the tunnelling happen
immediately or after the ball(s) have bounced a few times?
What is your value for BallRadius (from the engine), I can't confirm your
settings for ccd threshold & ssradius until I know that.
You can also try adjusting the friction and damping values if the balls have
too much energy in the system.
Thanks.
float ms = 1f / 60f;
//ms *= 0.1f;
///step the simulation
if (m_dynamicsWorld != null)
{
m_dynamicsWorld.StepSimulation(ms, 1);
Original comment by xexu...@gmail.com
on 15 Aug 2012 at 9:04
My BallRadius is 0.95f.
Original comment by stm.p...@gmail.com
on 21 Aug 2012 at 8:55
ok those values should be fine then.
Are you using the released binaries or a checkout of the source. If the latter
can you put a breakpoint in DiscreteDynamicsWorld.IntegrateTransforms - at the
line :
BulletGlobals.StartProfile("CCD motion clamping");
this will confirm if it's actually getting to the CCD part of the test.
Also could you provide your vertex/index data for the tables BvhTriangleMesh?
thanks.
Original comment by xexu...@gmail.com
on 22 Aug 2012 at 8:59
Original issue reported on code.google.com by
stm.p...@gmail.com
on 13 Aug 2012 at 3:14