SimpleGame: Handling like Blender?


I am new in JME and I have created a Box-Object which is attached to the roomNode and other Box-Objects which are attached to the Main-Box.

Since I have extended my “game” from class SimpleGame, the application now behaves like a game and contol is with arrow keys and “wasd”.

But I want to have a handling like in Blender, so I can move my “Box-Building” with mouse, rotating it. Zooming in and out with the scroll-wheel at my mouse etc. The appearance could be similar to this 3D-Application Menger Sponge .

Is there some finished OpenSource solution/example which I can directly use with my existing code?



Nobody known an answer?

You need to create a new Camera whith your custom key mapping.

Read tutorials in the wiki about that. Basically you listen to key event and adjust camera position accordingly.

The default cameras don’t do what you want.

well, after viewing your application it might be a bit more complicated.

the camera doesnt move, but you have an input handler which check if the ray from camera to pointer goes through your object, record movement when you click and update the object’s Tranform accordingly.

Thanks for your reply. Well, I am very new in jME2 and so I fear that I might have problems in doing such a complicated handler/controller. I wonder if anybody has released such a “move object with mouse” - which is used in every modelling software (Blender, 3dMax, Cinema4d, DazStudio, …) - as OpenSource for jME2. I don’t think that it is necessary to “reinvent the wheel”. Any hints for an existing handler/controller?


A move object with mouse listener shouldn’t be too tricky, check - out the com.jme.input.MouseInputListener, add an instance of your class that implements it to the mouse event chain with MouseInput.get().addListener( new MyMouseListener() ) and you’ll receive the all mouse input events you should ever need.

To mimic the behaviour of the application in the link, I’d suggest thinking about just rotating the object, working out the rotation from the x,y movements of the mouse …but again that’s just a suggestion.

Best of luck