gravity+physics does not work

Posted By: zazang

gravity+physics does not work - 11/12/08 10:45

Hi

I have a simple door model which I want to fall onto a terrain below and perform realistic physics based collision. The problem is that it passes through the terrain without any collision. Here is the code :-

var earthgravity[3] = { 0,0, -100 };
action physics_test()
{

while(!me) { wait(1) ; }

wait(-5);

phent_settype( me, PH_RIGID , PH_POLY );
phent_setmass(my, 15 , PH_POLY);
ph_setgravity( earthgravity );

}


Any ideas why it would not collide with the terrain ?

Thanks a lot.

regards
zazang


Posted By: WretchedSid

Re: gravity+physics does not work - 11/12/08 11:15

PH_POLY donīt work correct try PH_BOX. And you need a hollow Block around your level.
Posted By: zazang

Re: gravity+physics does not work - 11/17/08 02:51

Thanks !...I used c_setminmax to set the model to its size and used PH_BOX and it worked...however we cannot add a skybox to the game now...How does the skybox affect physics behaviour ?

regards
zazang
Posted By: Neurosys

Re: gravity+physics does not work - 11/25/08 22:17

thats wierd... im using skybox and makeshift gravity. Not a hollow box but the actual zbuffer rendered sky. I figured when I use physics i would need to lose my piddly gravity scheme and use the physics gravity but I dont want to lose my perfect sky!
© 2024 lite-C Forums