I am trying to have an entity with a gravity by using the Physics engine. But it don't work.
The entity is like a pendelum. It rotates around a certain point, but normaly it uses the gravity to swing. I have this code now, but I don't know if I am doing this right.
Code:
phent_settype(my,PH_RIGID,PH_BOX);
phent_setmass(my,50,PH_SPHERE);
phent_setdamping(my,100,100);
phent_setgroup(my,1);
ph_setgravity(earthGravity);
ph_selectgroup(1);
The var earthGravity is defined in the script. And this script is into the action of the entity.
I hope you can help me, because I still don't understand how to script gravity...