A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by ABACABB » Mon May 09, 2016 4:09 pm

I create level collision using NewtonCreateTreeCollision
- Code: Select all
NewtonCollision* const treeCollision = NewtonCreateTreeCollision (world, 0);
NewtonTreeCollisionBeginBuild (treeCollision);
//...
NewtonTreeCollisionEndBuild(treeCollision, 0);
Ok. I use simple sphere for create player control. All works without any problems.
But, when i create some body, using a NewtonCreateBox or NewtonCreateConvexHullFromMesh(on GIF), body can fall through collision mesh.
1 unit ~ 1 meter.
I use Irrlicht Engine.
I need some ideas… What's the problem.
-
ABACABB
-
by JoeJ » Mon May 09, 2016 4:52 pm
If the knife is fast enough so that in one frame it is entirely above and next frame entirely below the floor polygon, no collision is detected by default ("tunneling").
You can prevent this by setting continuous collision detection on for the knife:
NewtonBodySetContinuousCollisionMode (knifeBody, 1)
-

JoeJ
-
- Posts: 1489
- Joined: Tue Dec 21, 2010 6:18 pm
by Dave Gravel » Wed May 11, 2016 5:17 pm
The NewtonSetMinimumFrameRate can help too.
If you use 60, You have more chance to get this problem with objects moving fast.
Maybe 120 can help you to get a better result.
-

Dave Gravel
-
- Posts: 801
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 2 guests