#include <default.c>
#include <ackphysx.h>
function main()
{
physX_open();
level_load(""); // load an empty level
vec_set(camera.x,vector(-100,0,30));
pXent_settype(NULL,PH_STATIC,PH_PLANE); // create a static plane at groundlevel zero
ENTITY* ball = ent_create(SPHERE_MDL,vector(0,0,100),NULL);
pXent_settype(ball,PH_RIGID,PH_SPHERE ); // create a ball
pXent_setelasticity(ball,50);
pXent_addvelcentral(ball,vector(0,-10,0)); // make it jump and roll sidewards
while(1){
pX_pick(); // pick and move the ball with the cursor
wait(1);
}
}