Hi everyone,
I am just planing my first Game (university study) with jME2. It should be a simple "Surfer-Game", where you see the top of the surfboard and surf through a river. The river has a few curves in it and there should be a few boxes that the surfer shouldn't get in touch with. If he touches the boxes he falls down and the game stops…
These are my plans for now g I guess I have to use the physics engine for the water+board gravity and the box-touch-test …
What are you're suggestion on how to start my planing? The past few weeks I tried all the tutorials available for jME2. Today I started with the jme2physics tutorials…
I am just want to start my work and have the feeling I don't really know where to start
Is there anybody who tried something like this already?
Thanks, RapidM
it depends on how jMEPhysics2 collision works, if it differentiate transpassing a object and colliding for the first time, then it can be used.
make a ContactCallback that ignores the collision, but apply a force upwards on the surfboard based on the distance of it and the water. so it will smoothly get out of the water as it falls on it (because of the gravity). so two things might happen based on how jMEPhysics2 collision works.
1: as long as the surfboard is touching the water, it will count as a collision and will get a force applied on it (OK)
2: it will only consider the first time the surfboard touches the water and will ignore it until it “detouches” the water to make a new collision (Problem)
can’t test it here, so goodluck
refer to http://code.google.com/p/jmephysics/source/browse/trunk/test-interactive/com/jmetest/physics/TestContactCallback.java for ContactCallbacks