Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 16,643 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
moving car problem #360615
02/25/11 13:37
02/25/11 13:37
Joined: Dec 2010
Posts: 9
S
sbaya Offline OP
Newbie
sbaya  Offline OP
Newbie
S

Joined: Dec 2010
Posts: 9
Hi,i am using 3dgs(trial version)for now, and currently working on a driving simulator.
i found a tutorial at "aum64" about how to use "car project" template to create racing games using the built-in physics engine .
-in Wed choose map properties >>new script>> "Car_Project" .
-add a car body model then assign PlCar01 action, then add four wheels assign the actions PlCar01_WheelFL , PlCar01_WheelFR, PlCar01_WheelRL and PlCar01_WheelRR .
-save the level, build it and run it.
In A7 it worked very well,but when i tried to do the same at A8 i could not cause A8 is diffrent.
so i tried to find an alternative way, here what i did :
-in Wed choose map properties >>new script>> "template_Project" .
choose "project manager" then add :
car.h,camera.h,car_ai.h,and car_props.h .
-add a car body model then assign the action "car_player".
copy a wheel model to the same folder.
-then add this code to my program script:
#include <ackphysX.h>
function physX_level_load()
{ if (level_ent)
pXent_settype(level_ent,PH_STATIC,PH_POLY);
for (you = ent_next(NULL); you; you = ent_next(you))
{
if (you.emask&DYNAMIC) continue; // only register static ents
if (you.flags&PASSABLE) continue; var type = ent_type(you);
if (type >= 2 && type <= 5) // blocks, models, or terrain
pXent_settype(you,PH_STATIC,PH_POLY);
}
}
function physX_ent_remove(ENTITY* ent)
{ if (ent.body) // unregister entity before removal
pXent_settype(ent,0,0);
}

function physX_open()
{ physX_load();
pX_setsteprate(60,8,0);
pX_setunit(1/40);
on_exit = physX_destroy;
on_level_load = physX_level_load;
on_ent_remove = physX_ent_remove;
while(1) {
physX_run(time_step/16);
wait(1);
}
}

-save the level and script, build it and run it.

the result :
the car does not move.
only the car's rear wheels moves in its place (rotate) and the front wheels moves to the right and left.


if anyone know how to fix this problem, please tell me ...

Re: moving car problem [Re: sbaya] #361640
03/04/11 07:32
03/04/11 07:32
Joined: Dec 2010
Posts: 9
S
sbaya Offline OP
Newbie
sbaya  Offline OP
Newbie
S

Joined: Dec 2010
Posts: 9
I found the problem myself, thanks...


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1