Am I missing anything important?

Hi,

I am successlessly trying to get the physics engine to work. I have A6 Pro 6.22.

I have tried to follow the sample from AUM25, which works fine.

Now I am trying to add a cube to one of my existing levels that is supposed to act like the sphere in the sample.


I create the object, add the physic action -> and nothing happens

You'd at least exspect the darn object to fall down to the the floor, wouldn't you?

Here is the action I use:

[..]

entity* simpleCube; // A simple cube for testing


ACTION PhysikCube
{


phent_settype(my, ph_rigid, ph_sphere); // enable physics for this ball
phent_setmass(my, 1, ph_sphere); // the ball has 1kg (2 lbs) and behaves like a sphere
phent_setfriction(my, 30); // friction
phent_setelasticity(my, 30, 0); // bounce a little
temp.x = 0;
temp.y = 0;
temp.z = -380; // earth gravity factor, g = 9.81 m/s2
ph_SetGravity(temp); // set gravity
while (my.z > -150) {wait (1);} // the ball has approached the floor
sleep (3); // give it 3 more seconds
phent_setelasticity(my, 0, 0); // stop bouncing
sleep (3); // give it 3 more seconds
phent_settype(my, 0, ph_sphere); // now stop the ball

}

[..]

function LoadTestCube() // Is called from the main to create the cube.
{
simpleCube = ent_create("simplecube.mdl",simpleCube_pos, PhysikCube);
return;
}

[..]

Am I missing anything important?

Always my best,

John