2D physic based game but 3D rendering

Hello. (Sorry for spelling mistakes, I’m French.)



I searched for a long time how to load .obj files with a bump map, make explosion effects in JLWGL, and when I see how easy it is with jMonkeyEngine I am impressed.



However, I have one problem. The game I try to make (just a small personal project), does not require a 3D physics engine (but a 3D rendering, yes), like this game (which is wonderful, imo) :



http://imgur.com/suJis.png



I already used JBox2D as physical engine, and I just need a graphic engine.

Is there a way to “lock” spacials on one axis? Or don’t use the jBullet lib?



Thanks.

I guess you mean you don’t want it your spatial to move in the z direction?

Then you could do spatial.setLocalTranslation(spatial.getLocalTranslation().mult(1,1,0)). This would clear any z value and keep it at 0, while maintaining the other x and y values.

1 Like