Jump to content
  • Advertisement
Sign in to follow this  
deavik

Car rotation as a function of speed

This topic is 4680 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am making a car sim (go to this thread to check it out). Now I have a function to rotate the car by a fixed angle. How do you model the rotation as a function of speed. eg. the car should not rotate at all when speed = 0, also rotate lesser and lesser as speed increases. In the demo, I have used a simple parabolic function, but I'm not satisfied. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
I just wanted to clarify something. When you say "rotating" do you mean the car is turning as in normal driving, or is it spinning, i.e. out of control?


-Josh

Share this post


Link to post
Share on other sites
the centre of rotation of a car depends of the steering ange, and the wheelbase. the rate of turn, or angular velocity is then simply W = V / r, r being the turning radius, which can also be calculated when you calculate the centre of rotation.


// wheelbase
// <------->
// --- Velocity
// / | <------
// / ------| ^
// / \ --- |
// \ | |
// \ | | radius of turn
// \ | |
// \ | |
// \| v
// O Centre of rotation
//
//
//



I let you work it out, it's just trig.

Share this post


Link to post
Share on other sites
Thanks for all the replies! But oliii, before I saw you post, I had devised something like this:


static friction balances mv^2
----
R

(R is the turning radius)

So R = k * v^2 -> I am writing here:

R = Rmin + k * v^2

Now in a circle delta_theta = delta_l / R = v * dt / R;

Therefore, delta_theta = v * dt
--------------
Rmin + k * v^2



Seems to work alright. Let me know what you think ...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!