The purpose of this example is to demonstrate the EPhysics Gravity usage - The code apply gravity in an EPhysics_World with two cubes in movement.
For this example we'll have an EPhysics_World, and two basic EPhysics_Bodys.
The basic concepts like - defining an EPhysics_World, render geometry, physics limiting boundaries, add an EPhysics_Body, associate it to evas objects, change restitution, friction and impulse properties, were already covered in EPhysics - Bouncing Ball
Concepts like velocity and sleeping threshold were already covered in:
Here we set gravity on 3 axes (x, y, z) to (0, 0, 0). Gravity will act over bodies with mass over all the time.
We're using a button to call this function that receives test_data to stop the chosen body.
Stop angular and linear body movement, its equivalent to set linear velocity to 0 on both axis and angular velocity to 0 as well.
Here we finish the example. The full source code can be found at test_no_gravity.c.