blindfish wrote on Oct 12th, 2009, 8:42am:Depending on your experience with other languages I'd suggest you stick to getting it working properly in 2D first. Also, when you say you got it to "work" what does that mean Gravity isn't a complicated concept: it's easy enough to simulate by simply adjusting an object's velocity on the y axis each frame, and it's not particularly difficult to apply that in 3D. However I guess you might mean that each object has its own gravity and influence on all other objects, more like a solar system than standing on a planet.
You clearly need to be a little clearer about what you hope to achieve and what help you want in getting there...
This is the tutorial that I have used so far; processing.org/learning/topics/bouncybubbles.html
and kind of want to take the gravity code from that tutorial and fuse it with this; processing.org/learning/topics/bouncybubbles.html .
What I want is about ten different items. These items start on earth's gravity, so not moving at all. Then if I change the gravity with a potentiometer and with a push of a button, the items in the room will float around in the given gravity.
The items do not have to have different data for each item as I will try to simulate the gravity of say, the moon. So a car and a cat "falls" at the same velocity wether it's on the moon or on earth
10 items located in a 3d cube
all the items are randomly located on the floor of the cube
initial gravity is earths gravity
by turning the potentiometer the gravity data changes
push of a button, the items scatter around the room at the given gravity
hope this is a bit clearer