[SOLVED] JME3 Beginner: How to move Box node forward and backwards

This should be ‘really’ basic (I apologize in advance) but all I can find is more complicated ones (such as TestPhysicsCar and TestFancyCar.java examples). I find myself spending already too much time on this and i’m sure it’s out somewhere.

Basically I want to be able to control a box by moving it forward and eventually add other simple commands to it such as rotate, accelerate, decelerate, etc

I want to be able to control these commands by keys (which is thoroughly covered in the tutorials)

Thanks in advance

look at the TestChaseCamera or TestCameraNode, they show how to implement basic controls over a spatial (a teapot in the example) with the WASD keys

Ok that’s too basic :slight_smile:

My fault needed to be more specific.

I need that box to be limited by the front (just like a vehicle) as far as its movement. In other words move straight and if it has to turn, rotate, then move straight.

The move functions I found will move the box regardless of its position.

Does that make sense?

Didn’t say that was the solution, I did say that should be worth a look to achieve what you are trying to do.

You’ll have to play around with those examples, that the best way to learn.


But someone never searches the forum