Jbullet-jme methods

Hi,



This is probably a newbie question.  I have been playing with the code for TestPhysicsCar.  However, how do I make the vehicle move automatically?  So, instead of having to press the buttons u,h or k, how do I make it move by itself?



I tried to use



physicsCar.setLocalTranslation(new Vector3f(5,0,0));



However, that only changes the initial drop point.  Is there an update() method that I need to create?



Thanks.

Hi Normen,



Thanks for the quick reply.  I have managed to get the bike moving, but I notice that the accelerate(3) and so on keeps it moving.  I presume that if I use getLocalTranslation() to get the current position, I can then at certain coordinates within PhysicsSpace get the vehicle to change direction.  Or is there a better method to use?



I am using JME2 at the moment, as I only have access to a < OpenGL 2 graphics card.



Thanks again.

Yes, you could do that.

Well, just do that whats done when the keys are pressed. car.accelerate(10) , car.steer(FastMath.QUARTER_PI) etc…?