Hello Everyone,
I just finished getting my game up and running and now I am ready to add physics into the mix. I am attempting to create a 3D RTS space game. After going through the Newton tutorials, and Irrlicht/Newton integration tutorials, I noticed that there is a lot of double work. By double work, I mean that you have to load your mesh into Irrlicht, then load it into Newton, you have an ISceneNode and a Newton Body, each are used for collision and contain the position and rotation of the Node. I understand Newton is a different engine than Irrlicht, and because of this, they don't know about the same data, isn't there anyway to have Newton accept a ISceneNode or have Irrlicht use the data from a Newton body without loading the data twice? Or maybe I am misunderstand how Newton works and someone should correct me.
Now to the main question, which collision manager should I use?
I haven't gotten very far with my game so all of the collision, right now, has to deal to mouse clicks on the scene.
I would greatly appreciate anyone help or input on this matter.
Irrlicht vs Newton, collision comparison
It's unavoidable to have your game world and then the Newton world on top of it. That's how it works. BUT you might want to use Latest version of IPhysics or IrrNewt (I haven't used this one personally but it should have the same functionality) Irrlicht physics wrapper for Newton. So you would only have to load the mesh once with certain instructions and it will be added to Newton world automatically. It also has a lot more useful things in it. Don't reinvent the wheel.
Realize that those functions will severely reduce speed if you just add the actual rendering meshes, that have high polygon counts. I strongly recommend against doing that.
If you are a modeler, or know a modeler that really likes you , then I would recommend creating two meshes. One mesh should be the detailed render mesh, while another should be made that is strongly simplified, and a capsule (not literally) around the rendering mesh.
Then you load those two meshes into Irrlicht, load the physics specific one into IPhysics/IrrNewt, and then drop the Irrlicht copy of the physics mesh, if possible.
The easiet process, if you just want to make some bounding physics meshes, is make bounding boxes around specific pieces of the model, and rotate/move/scale them as needed so they fit.
If you are a modeler, or know a modeler that really likes you , then I would recommend creating two meshes. One mesh should be the detailed render mesh, while another should be made that is strongly simplified, and a capsule (not literally) around the rendering mesh.
Then you load those two meshes into Irrlicht, load the physics specific one into IPhysics/IrrNewt, and then drop the Irrlicht copy of the physics mesh, if possible.
The easiet process, if you just want to make some bounding physics meshes, is make bounding boxes around specific pieces of the model, and rotate/move/scale them as needed so they fit.
TheQuestion = 2B || !2B
So it is not necessary to copy my scenenode mesh vector buffers' into the Newton collision object, but instead load a simpilified version of the mesh or a bounding box around to the mesh into the Newton object.
What about collisions?
I understand Newton will be using collision detection on the bounding boxes for movement, but should Newton also be used to detect mouse click collisions? Or is Irrlicht better suite for this task?
What about collisions?
I understand Newton will be using collision detection on the bounding boxes for movement, but should Newton also be used to detect mouse click collisions? Or is Irrlicht better suite for this task?
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Are you sure that you need a physics engine? A RTS is usually characterised by lots of units running an approximate simulation.
Have you identified a requirement that would necessitate using a physics engine? If not, then I'd imagine that Irrlicht can provide all of the collision detection that you're likely to need.
Have you identified a requirement that would necessitate using a physics engine? If not, then I'd imagine that Irrlicht can provide all of the collision detection that you're likely to need.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
I Use Both...
...Newton for my object physics, Irrlicht for camera collision with the terrain.