Newton trouble.

BlitzMax Forums/BlitzMax Programming/Newton trouble.

ninjarat(Posted 2007) [#1]
Anyone who has the following mods:

Pub.Newton
Irrlicht.Core

Could you please show me an example of how to use the Newton dynamics engine? For example, creating some bodies (boxes or something) and having them collide in an irrlicht world.

I would really appreciate the help. Thanks!


ninjarat(Posted 2007) [#2]
Nevermind, I've cranked out some noob code. Here it is:



Oh and here's Irrlicht.Extended :


Problem is, a) they won't collide with each other, and b) they won't fall. Can someone enlighten me about this? I am brand new with Newton.


ninjarat(Posted 2007) [#3]
Hmm, still having a bit 'o trouble. The bodies go through eachother, and they don't fall. Any newton people have an idea about what causes this?


ninjarat(Posted 2007) [#4]
AAOOGAH! I GOT IT WORKING!

Have a look! :)



Pretty cool, the way they pile up and roll of the edges, huh? I swear, I love physics simulation so much I'll play ANY game that has it just to watch the ragdolls and boxes and stuff. I actually played Doom 3 just to see the ragdoll physics. I mean I cared more about Doom 3's ragdoll physics than the amazing graphics everyone raves about!


JoshK(Posted 2007) [#5]
Newton is the best system out there, even better than PhysX and Havok. For example, PhysX doesn't even have support for a cylinder primitive. Julio has some BSP algorithms in there that are useful for lots of non-physics stuff as well. I finally just ported all my intersection and raycasting routines over to Newton, since he has done such a good job optimizing it. For example, you can build a BSP out of a mesh, for raycasting that is an order of magnitude faster than testing each triangle. He even added some routines to perform a fast calculate of BSP triangles within a bounding box, for fast shadows or decals. Also, an upcoming version will use a GE Force 8800 to process physics on the gfx card.


ninjarat(Posted 2007) [#6]
Cool stuff! I sure hope my old junker can take it. :(

MORE AND MORE! Now there are spheres as well, and they all reset up at the top when they leave the world after falling off the main box. It's a continuous display now! Kinda proud. :)