Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 9:01 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Fri Jun 16, 2006 11:40 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
i'd like to detect if a certain wheel(or object) has lost its friction agains the ground(or other object).
It can be usefull to detect when can be draw the mark of the drift, also to make sparkles when two cars graze.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 17, 2006 11:00 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
This is a very hard question again :) (always, when it talks about tires). Nothing exists in Raydium to give you a simple answer, but the idea is simple (but since I've haven't made the test yet ... :) ). You should call dBodyGetPointVel(), wich returns you the current velocity of an element at a desired position. If you do this at the exact position of the contact between the tire and the road, the result should be zero (or around this value). If it's not the case, the tire is drifting.

if this method works, we should add this feature to ode.c :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 17, 2006 3:01 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
not sure about this theory...
If the wheel is moving (rolling) over the ground when the car circulates with normality, the wheel effectively has motion (and friction), so the velocity will be more than 0.
I think the unique way to discover a drift is using real physics( = too hard)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 17, 2006 3:06 pm 
Offline
User avatar

Joined: Fri May 19, 2006 4:28 pm
Posts: 39
If you know the velocity of your car and the 'rotational' velocity of your wheel, its quite easy: if you wheel turn n time per second, its radius is r (meters) and you car is moving at v meters per second; if you wheel has friction, then v should be equal to 2*pi*r*n

say if im wrong, but its real physics, no?

_________________
Charly


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 17, 2006 3:12 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
hmmm, it looks correct.
I go to try. But since is not a radial engine , it's a standar engine, some data are a bit hidden.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 17, 2006 3:17 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
I'm maybe totally wrong, but my old school memories says me that during a normal rolling situation, the relative velocity (not torque) at (road) contact point should be null ("perfect friction") in any stable physic system :)

Anyway, I'll check this one day, since its on my TODO :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 17, 2006 3:48 pm 
Offline
User avatar

Joined: Fri May 19, 2006 4:28 pm
Posts: 39
The velocity of the point of the wheel in contact with the road should be equal to the speed of the road (so the relative velocity is null). Since the car move at v meters per second and a point of the wheel move at 2*pi*r*n (tangential(?) speed) (and road doesnt move)
v - 2*pi*r*n
should be null.

So, if i understood my mecanics cursus, were both right :D

_________________
Charly


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 24 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:  
cron
Powered by phpBB® Forum Software © phpBB Group