|
3 registered members (AndrewAMD, Grant, Neb),
908
guests, and 6
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
How to setup a Car in ODE?
#331238
07/02/10 20:34
07/02/10 20:34
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
HI, Maybe someone can help me on how to setup a car correctly?(simple one, BOX as car, and simple wheels).
Iam stuck at setting up the wheels correctly(params1/params2)
I thought ic ould learn it by taking a look into "Knights on wheels" but this codee is just one big dschungel and no comments.
So maybe someone could help me or do an example?
Greets Rackscha
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: How to setup a Car in ODE?
[Re: alibaba]
#331250
07/02/10 21:37
07/02/10 21:37
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
ok, thanks i'll search for it^^
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: How to setup a Car in ODE?
[Re: Razoron]
#331259
07/02/10 22:01
07/02/10 22:01
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
@razoron thanks will try this AUM only uses a template :| (AUM 85) EDIT: nope didnt help. cant find the reason for THIS problem:  EDIT2: Ah XD just used the wrong axis 
Last edited by Rackscha; 07/02/10 22:40.
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: How to setup a Car in ODE?
[Re: Rackscha]
#331317
07/03/10 11:53
07/03/10 11:53
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
Okay, car itself seems to work. Now iam stuck at the steering. Wheels(front wheels) turn left/right according to key input, no problems. But sometimes they dont turn smoothly, they flip over. This is my code:
function control_car()
{
float max_angle = 0;
float stear_control = 0;
while(1)
{
stear_control = (key_d-key_a);
max_angle += stear_control*20*time_step;
max_angle = clamp(max_angle,-30,30);
if(stear_control != 0)
{
phcon_setparams2(my.con_a,vector(max_angle,max_angle,0),nullvector,nullvector);
phcon_setparams2(my.con_b,vector(max_angle,max_angle,0),nullvector,nullvector);
}else{
max_angle = max_angle*(1-0.5*time_step);
if(abs(max_angle) < 1)
{
max_angle = 0;
}
phcon_setparams2(my.con_a,vector(max_angle,max_angle,0),nullvector,nullvector);
phcon_setparams2(my.con_b,vector(max_angle,max_angle,0),nullvector,nullvector);
}
temp.x = (key_w-key_s)*1000;
phcon_setmotor(my.con_a,nullvector,vector(-temp.x,100,0),nullvector);
phcon_setmotor(my.con_b,nullvector,vector(-temp.x,100,0),nullvector);
phcon_setmotor(my.con_c,nullvector,vector(-temp.x,100,0),nullvector);
phcon_setmotor(my.con_d,nullvector,vector(-temp.x,100,0),nullvector);
wait(1);
}
}
con_a is front_Left wheel con_b fron right con_c back left wheel con_d back right wheel MAybe someone can help me to get the steering working correct?
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: How to setup a Car in ODE?
[Re: Rackscha]
#332065
07/07/10 14:28
07/07/10 14:28
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
OP
Serious User
|
OP
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
Still no idea  ? I know that this error doesnt occur in knightsonwheels, but the code of knightsonwheels is just a heavy mess. not readable for me.
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: How to setup a Car in ODE?
[Re: Rackscha]
#332066
07/07/10 14:34
07/07/10 14:34
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
take a look at the car template
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: How to setup a Car in ODE?
[Re: painkiller]
#338943
08/22/10 21:54
08/22/10 21:54
|
Joined: Nov 2008
Posts: 354 saeculum II
MPQ
Senior Member
|
Senior Member
Joined: Nov 2008
Posts: 354
saeculum II
|
look into this thread, there you will find help: Thread
new project in early stage...
Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
|
|
|
|