Posted By: MPQ
Physics for level - 01/02/09 13:40
Hello,
At the moment I try to look through the Physic-Engine of 3DGS. If I include eg. gravity power I cant move my model any more.
Does anybody know a tutorial how to use the Engine?
Here my test-script (whats wrong? I cant move on key_i/key_l):
At the moment I try to look through the Physic-Engine of 3DGS. If I include eg. gravity power I cant move my model any more.
Does anybody know a tutorial how to use the Engine?
Here my test-script (whats wrong? I cant move on key_i/key_l):
Quote:
function main()
{
level_load ("Physik.wmb");
wait(2);
ph_setgravity (vector (0, 0, -386));//9.81m/s^2
camera.x = - 50;
}
action model()
{
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 3, PH_BOX);
while(1)
{
if (key_i) my.x += 6 *time_step;
if (key_l) my.x += -6 *time_step;
wait(1);
}
}
{
level_load ("Physik.wmb");
wait(2);
ph_setgravity (vector (0, 0, -386));//9.81m/s^2
camera.x = - 50;
}
action model()
{
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 3, PH_BOX);
while(1)
{
if (key_i) my.x += 6 *time_step;
if (key_l) my.x += -6 *time_step;
wait(1);
}
}