hello all,
i am trying to make a planet model that runs physics. my big issue atm is that when i run my program, the "planet" (just a sphere atm) drops off into nothing…
i tried using Quaternions and doing a purely mathematical program, but i couldnt find a way (or just dont know JME well enough…) to get it to continue rotating more than one time. thus, i decided to try physics. the only issue i see is that gravity is ALWAYS there, which is great except the gravity should be pulling towards the planet and not downward towards nothing…
i cant just make the sphere a static node because it is going to be rotating…
also, i cant just make a floor and have it rotate on that because of the camera system i am using… (well, unless i make the floor transparent… can i do that?)
code:
Sphere bound = new Sphere("Camera Sphere",75,75,565f);
bound.setModelBound(new BoundingSphere());
bound.updateModelBound();
Sphere planet = new Sphere("Planet",50,50,200f);
planet.setModelBound(new BoundingSphere());
planet.updateModelBound();
planet.setRenderState(ts);
planet.updateRenderState();
DynamicPhysicsNode pivot = getPhysicsSpace().createDynamicNode();
pivot.addTorque(new Vector3f(10,0,0));
pivot.attachChild(planet);
rootNode.attachChild(bound);
rootNode.attachChild(pivot);