back, and confused

Posted By: dakilla

back, and confused - 01/25/11 18:07

hey,
been away from gamestudio for a while now and have just came back again, see whats changed etc. I have however been having a problem with a script I quickly made, I dont know if i am forgetting something basic or maybe doin something wrong with the new physics. when I run it the entity just stays where it is with no movement. I have loaded a level, and just dunno why it wont do anything. cheers in advance laugh

function playerst()
{
VECTOR force;

player = ent_create("ball.mdl",vector(0,0,100),NULL);
set(player,SHADOW);
pX_setgravity(vector(0,0,-350));
pXent_settype(player,PH_RIGID,PH_SPHERE);
pXent_setmass( player, 1);
pXent_setelasticity(player,25);
pXent_setdamping(player,20,5);

while(1)
{
vec_set(force, vector(100,0,0));
pXent_addforcecentral(player, force);
wait(1);
}
}
Posted By: TerraSame

Re: back, and confused - 01/25/11 18:21

I assume that you know that terrains need to be at a scale of one (in WED) for using the new PhysX system...
If yours is not, scale in in med and then re-set the scale in WED to one... Hope that helps...
Posted By: Superku

Re: back, and confused - 01/25/11 18:50

You need to call physX_open(); before you load your level.
Btw the unit scale has changed, -9.81 to -15 is a good value.
© 2024 lite-C Forums