hi, i’m a begginer, how to give speed to my spatial.
Poke it with a stick till it moves
It seems like you are misinterpreting something, could you please either:
- read the wiki tutorials (link at the top of this page) or…
- specify what exactly you want (a spatial does not have speed) or…
- post some code to explain the issue
Some very interesting reading relating to your endevour.
If you want to do it with Physics look here: https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_physics.html
If you don’t care about Physics and just want to move things look here: https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_main_event_loop.html
Note the second one does “rotation” but I’m sure if you look through the other actions you can do on the player object you might be able to pick the right one (COUGH COUGH translation COUGH)
To attach user-defined information (such as speed or velocity) to a Spatial, one solution would be the Spatial.setUserData() method. To update the position of a Spatial on every frame, use a custom scene-graph control or an app state.
Or you could use the Bullet physics library that’s integrated into JME.
thanks to everyone. sorry i dont want to reply because my english is bad,i just give love
Don’t worry about it, there are many people on here who do not speak English as a first language. Welcome to the forums.