Help Getting Started

Hi, I'm new to JME and I'm starting to write a program that will take a particle and make it move in a random motion inside a hollow object (like a pipe). 



For example: If the the particle collides the inner top of the pipe, the particle will take a random number to determine its direction.  Then it will move in a straight line until it hits another  part of the pipe. This continues until the particle leaves the pipe.



Current Problems:  Getting a model of a pipe-like hollow object.  Does JME have a built in shape like this? How to let the particle move inside a pipe and the collision detection inside the pipe.

Since I'm still new to 3-d programming, I'm still having trouble having the camera start of pointing straight at the pipe and seeing both the pipe and the particle.



Testing: I'm currently trying to start out with 2 disks and having a particle bouncing between the 2 disks.



If anyone could help me out, I would be extremely grateful.



Thanks

Kejixu said:

Hi, I'm new to JME and I'm starting to write a program that will take a particle and make it move in a random motion inside a hollow object (like a pipe).  


First, welcome!

Kejixu said:

Current Problems:  Getting a model of a pipe-like hollow object.  Does JME have a built in shape like this? How to let the particle move inside a pipe and the collision detection inside the pipe.


Different name, same idea :D
http://www.jmonkeyengine.com/doc/com/jme/scene/shape/Tube.html

As far as collisions, this is certainly a capability of jMEPhysics..  A very new tutorial is located here: http://www.jmonkeyengine.com/wiki/doku.php/starter:move_a_robot_with_jme2physics

Kejixu said:

Since I'm still new to 3-d programming, I'm still having trouble having the camera start of pointing straight at the pipe and seeing both the pipe and the particle.


This can be accomplished by something like the following, which aims the camera at the location of the tube when Y is the up-axis:

myCamera.lookAt(myTube.getLocalTranslation(), new Vector3f(0,1,0));

Thanks this helped a lot!  Few more questions.  How would I place the ball in the center of the tube.  Is there anyway to make the tube transparent?  And, how would i attempt at making the ball move in a random direction but in a straight line after a collision? 



Thanks again.