Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Tue Mar 19, 2024 10:15 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: A physics question
PostPosted: Tue Mar 11, 2008 6:57 pm 
Offline

Joined: Mon Feb 18, 2008 10:16 pm
Posts: 4
Hy all, I have a question.
I'm busy building a racing simulation based on Maniadrive/Raydium.
It's not very difficult to understand most parts of raydium, but I have a question.
Where are the physics for the Clio located? The wiki has a physics page, but it's in French, and my French is from 15 years ago so not that good anymore :)
If I'm a bit further with the project I'll probably come back with more questions, but so far the engine is a really good start for me, thanks.

Dick


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2008 8:21 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Raydium includes ODE, a physic engine. So every "object" created in the game will be part of the physic engine.
So the physic is hidden (managed by ODE) and the physics properties are given when you create each object(for example when you create the parts of the car).

Have I answered you question?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2008 8:31 pm 
Offline

Joined: Mon Feb 18, 2008 10:16 pm
Posts: 4
Thanks for the quick answer vincente, but it's not quite the answer that I was looking for ;)
I know Raydium's physics are handled by ODE, but where do I give in the properties for a car, for example the torque curve, gear ratio, but also the size of the car and where the wheels must be etc.
I'm pretty experienced in programming and 3d modelling, but I have to know where to start :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2008 9:08 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

look at create_car function.

You can find that car is approximated with a box, wheels by sphere.
Each have a mass.
Each wheel is moved after creation it will be the final place (after being fixed by a joint).

gear ratio is defined in

Code:
dReal gears[]={-0.4,0.4,0.6,0.8,0.9,1.0};

global var and gear

gear usage is disabled but still there
Code:
//    raydium_ode_motor_power_max_name("moteur",0.1);
//    raydium_ode_motor_gears_set_name("moteur",gears,6);
//    raydium_ode_motor_gear_change_name("moteur",gear);


An engine is there you can give his max power.

For the rest it is more complicated.
Ode doesn't natively support tork curve.
If you want to simulate this you have to read back engine speed and adapt motor power from the curve. You can do this at each timestep if you want.

Maniadrive is a big application, you can try with test8 (tank physic ;D) or test6, kinghill have a good car model that you can use.

Have a nice day
Ouille.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group