|
Re: Can't get physics to work!
[Re: ScriptMaster]
#22961
02/05/04 08:00
02/05/04 08:00
|
Joined: Oct 2003
Posts: 1,258 Virginia, USA
qwerty823
Senior Developer
|
Senior Developer
Joined: Oct 2003
Posts: 1,258
Virginia, USA
|
or using the demo version, which is Extra, I believe.
Never argue with an idiot. They drag you down to their level then beat you with experience
|
|
|
Re: Can't get physics to work!
[Re: anrkies]
#22963
02/05/04 15:31
02/05/04 15:31
|
Joined: Nov 2003
Posts: 19
iprogramgames
Newbie
|
Newbie
Joined: Nov 2003
Posts: 19
|
Here is your altered code which I have verified works:
action phys { var earthGravity[3];// = 0,0, -386;
earthGravity[0] = 0; earthGravity[1]=0; earthGravity[2]=-386;
phent_settype(my, PH_RIGID, PH_ball); ph_setgravity(earthgravity); }
Here is some code to make the entity act more like a ball.
action physicsBall { var earthGravity[3];// = 0,0, -386;
earthGravity[0] = 0; earthGravity[1]=0; earthGravity[2]=-386;
phent_settype(me, PH_RIGID, PH_SPHERE); phent_setfriction (me,100); phent_setelasticity ( me, 50, 0 ); ph_setgravity( earthgravity ); }
Notice I have made the variable earthGravity a local variable. You may wish to make it global but this allows you to simply cut and paste the code.
Newbie... yeah, right.
|
|
|
|