IrrODE - an Irrlicht - ODE wrapper (now with SVN)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Sky-Fox
Posts: 29
Joined: Fri Feb 04, 2011 10:49 am

Post by Sky-Fox »

How to make a pause in IrrODE.

My code does not stop the physics. :-(

Code: Select all

 if(!Game_PAUSE)CIrrOdeManager::getSharedInstance()->step(); 
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

There is actually in the moment no way integrated to pause the simulation. If you don't call "step" while it's paused it should do all the movement after it's continued. What should work is to call the "stop" method of Irrlicht's timer (although this would stop almost anything, e.g. the FPS cameras). Maybe I should add a function to pause the simulation.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

How do I find all objects that are colliding?
EDIT: Nevermind. I figured it out.
multum in parvo
booe
Posts: 76
Joined: Thu Jul 29, 2010 2:12 pm

Post by booe »

I downloaded the lastest irrode, launched the "irrodeCAR" demo and.... wtf?!
Image
Where are the aforementioned select-vehicle buttons?
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

There was a little change in the past. Before you get to that screen you (should) see a selection screen where you can chose the screen resolution, fullscreen mode and which vehilces should be in the scene (with the comboboxes). If you don't select any vehicles you won't get any button there. Maybe I should add a check so the program doesn't start without any vehicles.

One note: if you start the program from the Windows Explorer by selecting it and pressing the "Enter" key it sometimes happens that the "Enter key pressed" event is also received by that selection window, in that case try to start it by double click.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Fixed a nasty little "NULL" pointer bug that occured when a new motor was added in using the IrrOdEdit plugin.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
newleon
Posts: 19
Joined: Mon Jan 10, 2011 7:59 am
Location: Pohang, South Korea
Contact:

problem with IrrOde

Post by newleon »

Hi
I am trying to implement a simple car driving simulation using Irrlicht and IrrOde. I did everything based on the tutorials, starting from HelloWorld, but I got an error I don't know how to solve. First I am using Windows 7, Visual Sutdio 2008, irrlicht-1.7.2, ode-0.11.1, and the last downloadable IrrOde. In the tutorial you mentioned use of ode_singe.lib but in my case I get only ode_doubled.lib after building the solution. I follow exactly the Tutorial 02, and there is no error during compiling but there is an error during execution. A message "no world!" is displayed and then the program exit. I tried to use irrlicht-1.7.1, and ode-0.11 but the problem still stands. Do you have any idea what is wrong with my code?
Thanks
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I just sent you a PM. Best thing would be to post the code so I could take a look at it, maybe it's nothing too complex.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
newleon
Posts: 19
Joined: Mon Jan 10, 2011 7:59 am
Location: Pohang, South Korea
Contact:

problem with IrrOde still stands

Post by newleon »

I tried the same code under Windows XP but the problem still stands.
Let me tell everything from scratch. Maybe you find something in my process:
1) I download irrlicht-1.7.2 and just extract it into C:
2) I download ode-0.11.1 and after making vs2008 solution using "premake4 vs2008", I just build the solution and in result the ode_doubled.lib is made within DebugDoubleDLL folder.
3) I download irrode.tar.gz and extract it and then I run IrrOde.sln inside vc2008 folder. In response libIrrOde.lib is made.
4) I just make an empty win32 console project, then copy the content of the main.cpp within C:\irrode\source\helloOdeWorld folder into my main.cpp. Then I change the Additional Include Directories and Additional Library Directories and Additional Dependencies to appropriate folder names and file names.
5) When I compile the solution, there is no error, when I want to run it, it ends suddenly. I can see "no world!" message on the black DOS display. This happens both on Windows 7 and Windows xp.
I don't know which part I am doing wrong. There is hint from ODE website under (), it says:
"Add one of the preprocessor symbols dSINGLE (single precision) or dDOUBLE (double precision), depending on how ODE was configured. If none is defined, single precision is assumed; if the wrong precision is enabled all floating-point data going in and out of ODE will be corrupt, producing all kinds of errors."
Is this library ode_doubled.lib means I should add dDOUBLE preprocessor? And if yes how should I do that?
Why both in your tutorial and ODE wiki, ode_singled.lib is mentioned, but in my case I have just ode_doubled.lib? Is there any way I can make single version instead of double version?
In page 30 of your posts, Sky-Fox answered this:
"Thank you very much. Problem solved!
I recompile my ODE. (ode_single.dll)"
It seems he had such a same problem, but I couldn't trace it.
You told me it is better to send the code to you, I am just using your code, so I think it doesn't need to share any piece of code.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I think there should be separate build targets for all kinds of ODE solutions (like single precision or double precision) generated with premake. If not try to search for a place where defines can be set in VC (I normally use Code::Blocks, so I don't know where to search) and simply add "dSINGLE" there. This should make a single precision ODE drop out.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
newleon
Posts: 19
Joined: Mon Jan 10, 2011 7:59 am
Location: Pohang, South Korea
Contact:

problem with IrrOde still stands

Post by newleon »

It seems I am going to give up using IrrOde. I don't have any idea how to solve the run-time error, I mean "no world!" problem.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I'm sorry for that, but I wasn't able to reproduce the problem on my system.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Lonesome Crow
Posts: 4
Joined: Tue May 03, 2011 7:03 pm

Removing Objects

Post by Lonesome Crow »

Hi,

I'm trying to remove objects from my simulated world.

When I call "pBody->doRemoveFromPhysics()", the physics simulation doesn't affect the object, so I think it was successfully removed from IrrOde.
However, I need to remove it from Irrlicht too and then I call "pBody->ISceneNode::remove();", getting a seg fault (when debugging) or a "ODE INTERNAL ERROR 2: Bad argument(s) in dGeomSetBody" (when running).

What am I doing wrong?

I'm on a 64-bit Linux system using Code::Blocks and Irrlicht 1.7.0.

Thanks!
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I'm not sure and can't take a look at my sources right now (you know ... sitting at work ;) ), but you could check the CProjectile class of the IrrOdeCar demo. In this demo you can shoot projectiles and missiles, and the objects get removed from both the physics and the scene without segmentation faults. It sort of works this way (from memory)

- collision detected
- remove from physics
- hide bullet/missile
- play explosion animation
- remove node from scene once animation is finished
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Lonesome Crow
Posts: 4
Joined: Tue May 03, 2011 7:03 pm

Post by Lonesome Crow »

I have already read CProjectile.cpp, but I couldn't find something helpful... However, I tried to look it again today, and all I found (or understood) was that this should work:

pBody->doRemoveFromPhysics();
world->getSharedInstance()->removeSceneNode(pBody);
pBody->remove();

But it didn't. I got the same problem, but now it occurs on "drawAll()" execution... :(
Post Reply