"Box" Object Behavior in Hello SimpleApplication

I’ve just started learning game programming with JMonkey Engine
I don’t understand the behaviour of the box( Also I don’t see any box, I see just a square, anyway.). For example:

1- If I press the right button, the box goes left and returns right of the screen.
2- If I press the up button, it goes down and returns on top of the screen. etc…
3- The most interesting thing is, if I press up and right button together, the box goes down left but returns on top left.

At first, I supposed that the box is in a sphere and I turn the sphere but if so, why I press up and right button together, it returns on top left.
Could anybody help me to understand?

2 Likes

You are controlling the camera, not the box.

4 Likes

and the box do not have a material nor is a light involved, so everthing looks flat. work through the beginners tutorial in the wiki

2 Likes

Okey, thanks, everything became more clear for me.Then 3 question:

  • Why box disappear and after reappear?
  • How to move camera?
  • and how to 3. point of my question occur?

Spin around in your chair. Do you see your computer the whole time or does it disappear and reappear as you spin. Again, you are turning the camera. You are not moving the box.

You are already moving the camera. Or do you mean other than turning? WASD moves. PLEASE DO THE TUTORIALS.

Again. You are turning the camera. The camera is turning. The keys you are using turn the camera.

But the camera is at a fixed roll and does not limit up/down (pitch) so eventually you can be upside down looking behind you but turned around 180 degrees. (Like if you were standing on your head in your chair.)

3 Likes

Thanks for all. I really got it. :+1: