How to make a dynamic shared node

Hi, as some as made (I suppose), I would like to put some dynamiPhysicsNode in my game.

So, I've tried to create different dynNode but my machine has dead. (Consider that are 50 nodes)

Then I try to use shared node, doyng this :

create the dynNode, create the shared node and added 50 of the object —> Objects are placed but no collision (maybe my fault…? )

so tried the inverse :

create the normal node, created shared node, added normal node to shared one, and then generate physics over shared  ----> Gives me "Geom with native address 0x3f8000003f000000 not found!"

so, again, I tried this :

create the normal node, created shared node, added normal node to shared one, and then addedd every child of shared node to dynNode and then generated the physics —> same result of above.

Which is the right way ?

First: SharedNodes do not improve performance for physical simulation. You can use them to optimize the rendering only. So if your system 'dies' with 50 physical nodes you can't fix this with shared nodes.

Second: Using SharedNodes is more complex than using doubled meshes. Start with normal Meshes first. If you got everything running you can switch to SharedNode and cope with that later to squeeze out some more frames.

As it's unclear to me what you have actually done I cannot help you with the actual problem, but my suggestion would be: Don't use SharedNodes now, but use them later. If you still have problems then, post back here.

Exception in thread "main" java.lang.StackOverflowError: The ODE step function could not allocate enough stack memory to compute the time step!

This is usually caused by low stack size or by too many applied contacts respectively (number of contacts in this step was 2244).

This is what gives me the system with 50 DynamicPhysicsNodes…note that one of the JVM arguments is -Xss2048k

50 Objects are not many objects, so you have another problem. Do you probably stack all those objects (e.g. bricks in a wall)? This generates many (hundreds) of contacts - this is a problem for ODE.

Additionally: The JVM argument applies only for new threads. Make sure you start() your Game class from a new thread (not in the "main" thread).