I'm just starting to program in Lite-C, so this should be a quick fix. I'm trying to just get the basic concepts behind creating and object and passing it to the physics engine. Problem is, when I do it, it sinks right through the ground, almost as if the ground is made of some liquid. I know this isn't the case, because it's the same ground from earthball, so I have no clue what's happening. Do I need something set up differently in MED or something? I remember clicking some button that made the objects look more blocky, rather than smooth, could that have caused this in some way? anyways, here's my code:

function main()
{

level_load("small.hmp");
ENTITY* object;
object = ent_create("test_Torus.mdl", vector(10, 20, 30), NULL); //test_Torus is the basic torus#2 shape from the MED

phent_settype(object,PH_RIGID,PH_POLY);
phent_setmass(object,1,PH_POLY);
phent_setfriction(object,90);
phent_setelasticity(object,75,100);
phent_setdamping(object,30,5);
ph_setgravity(vector(0,0,-50));

}
The torus is spawned above the terrain, and falls a few feet to the ground, where it is slowed temporarily, but then sinks through.

Last edited by Hammer_Studio; 12/05/09 12:07. Reason: Clarification