how to create rigid bodies in irrlicht?
-
suresh kumar
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
how to create rigid bodies in irrlicht?
hi all,
I'm new to irrlicht.can anybody tell me how to create rigid body in irrlicht? with or without third party physics lib? Preferably without any third party physics lib.if with, it would be great to have newton.
Thanks
I'm new to irrlicht.can anybody tell me how to create rigid body in irrlicht? with or without third party physics lib? Preferably without any third party physics lib.if with, it would be great to have newton.
Thanks
The Journey is more important than the destination...
irrlicht can only handle collisions I think, you'll have to use third party lib, such as the one you mentioned, tough I found newton hard to integrate. you could look here for simple bullet physics implementation:http://irrlicht.sourceforge.net/phpBB2/ ... ght=bullet
Or you could search for newton wrapper in the forums and try to upgrade it for newest newton version.
Or you could search for newton wrapper in the forums and try to upgrade it for newest newton version.
Working on game: Marrbles (Currently stopped).
-
suresh kumar
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
-
ChaiRuiPeng
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
well i think bullet is failry easy to use and set up.suresh kumar wrote:my work involves very simple stuff like cubes and spheres thats it. so which one is better, as in easy to learn and implement.i worked on box 2d extensively.
it might be too big though for what you need...
may i ask which platform intendt to build on?
-
suresh kumar
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
It does, you have a lot more limited resources on mobile. Also the speeds of mobile devices are a lot slower, so you will have to optimise physics and irrlicht a lot I think to get good results.suresh kumar wrote:mobile... will it matters?
And yes, you should totally try bullet and make a mini wrapper for it, as you don't need much features as I see.
Also you could try searching for some simpler physics library, tough I don't really know any that would be easy to set up.
Working on game: Marrbles (Currently stopped).
-
suresh kumar
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
I don't really know, you should probably try both with minimal samples and see which gives you better results. For me bullet is just amazing by its ease of use.suresh kumar wrote:do you think bullet do well than newton in this scenario i mean the platform.
Working on game: Marrbles (Currently stopped).
-
suresh kumar
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
rotation around a point
Hi all,
How to rotate an object around an arbitrary point? i have a cube it should do somersault on press of button.
Thanks all helps are highly appreciated
How to rotate an object around an arbitrary point? i have a cube it should do somersault on press of button.
Thanks all helps are highly appreciated
The Journey is more important than the destination...
Re: rotation around a point
Are you using physics library? there is more than one way to do this.suresh kumar wrote:Hi all,
How to rotate an object around an arbitrary point? i have a cube it should do somersault on press of button.
Thanks all helps are highly appreciated
Working on game: Marrbles (Currently stopped).
-
suresh kumar
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
Erm, the only doc irrlicht has is doxygen API, look at the main page for it.suresh kumar wrote:ya i got it working...but anyway i'm not using any physics lib...one more thing where can i find doc regarding vector and matrix classes in irrlicht...
Working on game: Marrbles (Currently stopped).
-
suresh kumar
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
-
suresh kumar
- Posts: 13
- Joined: Fri Mar 11, 2011 7:06 am
i used like this
if(pNode->getTransformedBoundingBox().intersectsWithBox(pCube->getTransformedBoundingBox()))
pDebug->debug("TRUE");
else
pDebug->debug("FALSE");
it is always returning false except the first frame
donno what the heck is going on....
help me out
if(pNode->getTransformedBoundingBox().intersectsWithBox(pCube->getTransformedBoundingBox()))
pDebug->debug("TRUE");
else
pDebug->debug("FALSE");
it is always returning false except the first frame
donno what the heck is going on....
help me out
The Journey is more important than the destination...
-
shadowslair
- Posts: 758
- Joined: Mon Mar 31, 2008 3:32 pm
- Location: Bulgaria
This code only performs an aabb-aabb (axis-aligned bounding boxes, both in world space) intersection test, which is either true or false for non transformed (non rotated) bboxes. For a collision response you need collision info, then you use it to apply some impulses for the physics simulation. Unfortunately I highly doubt you`re gonna be able to achive this using the build-in functions, and creating a robust rigid boxes physics simulation from scratch is a bit of pain, especially stacking etc.suresh kumar wrote:i used like this
if(pNode->getTransformedBoundingBox().intersectsWithBox(pCube->getTransformedBoundingBox()))
pDebug->debug("TRUE");
else
pDebug->debug("FALSE");
Then you probably need to update the collision data for each frame. Recently we`re out of crystal spheres, so please help us help you. If you need an exact answer, you need to post some code. Everything else is just guesses...suresh kumar wrote:it is always returning false except the first frame
donno what the heck is going on....
help me out
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."