Hi all!
I am newbie in programming with newton Physics Engine and i have a question:
How can i make collision (with help of IrrNewt...or any else?) with my terrain and object/s?
Terrain and objects collision with IrrNewt...
-
- Posts: 12
- Joined: Sun Feb 25, 2007 6:08 pm
wrong forum. visit http://www.newtondynamics.com/
terrain collision in irrnewt 0.4 is probably broken
well this is the external stuff forum, so i don't think it's the wrong place for this, since it's not a newton-internal specific question, but one about using irrnewt to do this according to the subject line.
that said, the only news i have for you is not good. in irrnewt 0.4 which i'm using there is supposed to be a collision type you can use called EBT_TREE_TERRAIN, but in trying to use this I continually have been getting a runtime access violation which i have so far been unable to solve. I have tried using the normal EBT_TREE collision type with a terrain scene node as well, but it fails to respond correctly to collisions, it simply acts like it's not even there. EBT_TREE works great for BSP type level geometry but not terrain, which is why I guess EBT_TREE_TERRAIN is there, but as far as I can tell it is broken, at least in irrnewt 0.4 which is what I'm using and I think is the most recent version.
that said, the only news i have for you is not good. in irrnewt 0.4 which i'm using there is supposed to be a collision type you can use called EBT_TREE_TERRAIN, but in trying to use this I continually have been getting a runtime access violation which i have so far been unable to solve. I have tried using the normal EBT_TREE collision type with a terrain scene node as well, but it fails to respond correctly to collisions, it simply acts like it's not even there. EBT_TREE works great for BSP type level geometry but not terrain, which is why I guess EBT_TREE_TERRAIN is there, but as far as I can tell it is broken, at least in irrnewt 0.4 which is what I'm using and I think is the most recent version.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
-
- Posts: 12
- Joined: Sun Feb 25, 2007 6:08 pm
Well...big thanks for your reply...can you tell me which physics engine is better(and simplier) to use(not IrrNewt)...because i tried to do something with: Newton,Bullet,ODE...but i can't understand a lot...if there would be an example like terrain collision with Newton,it would be great!
...i'm too stupid... ...i want to make my strategy game...but i can't understand Newton collisions (almost)
...i'm too stupid... ...i want to make my strategy game...but i can't understand Newton collisions (almost)
You could try bullet. Here's a demo that might help
http://www.bulletphysics.com/Bullet/php ... f=17&t=830
Or you can look at some of my source code:
http://irrlamb.googlecode.com/svn/trunk ... errain.cpp
http://irrlamb.googlecode.com/svn/trunk ... hysics.cpp
The hardest part is converting an irrlicht mesh into a bullet mesh. Once you have that, it's pretty easy.
http://www.bulletphysics.com/Bullet/php ... f=17&t=830
Or you can look at some of my source code:
http://irrlamb.googlecode.com/svn/trunk ... errain.cpp
http://irrlamb.googlecode.com/svn/trunk ... hysics.cpp
The hardest part is converting an irrlicht mesh into a bullet mesh. Once you have that, it's pretty easy.
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
This might help you Mushketer, it's a small project I made that uses convex hulls, static meshes, materials and a few other functions of newton with 3ds files. You control a space ship that moves with the application of forces and torque, and if you uncomment a few things you can shoot projectiles. Turn left when the program first starts and you will see a cube you can push around.
It's pretty sketchy and the code for Newton is all lumped into one class file (this was the first time I had used Newton) but you will be able to work out how to use Newton if you study it for a while.
http://rapidshare.com/files/55824563/31 ... t.rar.html
In the case of your terrain you would want to model it physically using a static mesh. Any objects that need to move around (and have mass etc.) will be modeled using convex hulls.
It's pretty sketchy and the code for Newton is all lumped into one class file (this was the first time I had used Newton) but you will be able to work out how to use Newton if you study it for a while.
http://rapidshare.com/files/55824563/31 ... t.rar.html
In the case of your terrain you would want to model it physically using a static mesh. Any objects that need to move around (and have mass etc.) will be modeled using convex hulls.