Creating a finite sized cube game area

Hello,



I am an experienced java programmer but am very new to JME3 so keep that in mind. The first thing I want to do is to create a game area that is cube shaped where objects can move around in the bounds of this cube. Think of a back that you toss objects such as balls into.



I looked around through the api but the objects such as Box don’t seem to be quite what I want. I think the closes thing, is the floor in HelloPhysics, but it would need walls and a ceiling.



Any direction would be appreciated! Thanks for taking the time to read this!

For quick results, you can build your scene from Box primitives (a flat box is a wall or a floor). Later you can create models using Blender and import them.



I’d suggest you to do these tutorials for a quick overview.

Do all tutorials, then it should be apparent how to do that (not just looking for the solution in one place, all of the tutorials are the solution).

Thanks,



I found this: http://code.google.com/p/jmonkeyengine/source/browse/branches/jme3/src/test/jme3test/bullet/TestSimplePhysics.java?spec=svn6696&r=6696



And also went through the HelloPhysics tutorial. Each of those seems to have pieces I want, but they seem to get there very differently (CollisionShape vs Box for example).



How would I know which path to go down?

Well, there is not the one correct path, theres always more than one path, and mostly more then one path is “correct”.



For example, if you do not want a player to leave a cubic area, you could do something as simple as this in the update loop:



old_position = player_position();

move(player, tpf);

if(player_position().x > cube.width || player_psoition.x < 0)

set_player_position(old_position);



etc.pp.



What a viable path to go down is, and what not, highly depends on what you want to achieve.

Ha, I like that quote “there is not the one correct path, theres always more than one path, and mostly more then one path is “correct”.”

Or you can place “invisible” blocking elements at the edge of our arena … physics will do the rest.