// Entitys
ENTITY* rad;
ENTITY* ball;
// Vectors
VECTOR ball_force;
action act_gondel()
{
ball = me;
ph_setgravity (vector(0, 0, -386)); // set the gravity
phent_settype (ball, PH_RIGID, PH_BOX); // set the physics entity type
phent_setmass (ball, 3, PH_BOX); // and its mass
phent_setfriction (ball, 80); // set the friction
phent_setdamping (ball, 40, 40); // set the damping
phent_setelasticity (ball, 50, 20); // set the elasticity
while (1)
{
phent_addtorqueglobal (ball, ball_force); // add a torque (an angular force) to the ball
my.scale_x = 6;
my.scale_y = 6;
my.scale_z = 6;
wait(1);
}
}