Browse Search Popular Register Upload Rules User list Login:
Search:
Realistic Tires (ABS works on these)

Image:
screenshot of the scene

Author: The Linkage

Group: Technical

Filesize: 18.76 kB

Date added: 2017-03-15

Rating: 5.6

Downloads: 1142

Views: 223

Comments: 4

Ratings: 2

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

The main thing I disliked about Algodoo's cars for some time was the absence of dynamic friction. A.K.A if your car's wheel was NOT slipping and at the verge of locking vs if it was locked will yield the same braking distance, and acceleration. This is obviously not like that irl. so I became obsessed with dynamic friction and finally decided it was time to do this thing. I thought it would be hell to make... but it took 5 minutes :P go figure

Basically calculates speed based on angVel like a real car, then uses the real vel to compare, and if the |difference| between the two is higher than 1, then the wheel gets a big decrease on friction - from 1 to 0.5 (changeable ofc)

To do the test HOLD the keys (nothing bad will happen if you don't anyways!)
W to accelerate, S to brake

Use the grid as a speed reference
Last edited at 2017/03/19 14:24:06 by The Linkage
Please log in to rate this scene
edit
Similar scenes
Title: Realistic Tire
Rating: 6.5
Filesize: 370.72 kB
Downloads: 278
Comments: 0
Ratings: 2
Date added: 2008/06/06 02:45:55
Made with: Phun
Rating: rated 6.5
download
Title: Jeep with Realistic Suspension and Tires
Rating: 5
Filesize: 59.64 kB
Downloads: 499
Comments: 3
Ratings: 1
Date added: 2009/06/15 23:00:19
Made with: Phun
Rating: rated 5
download
Title: soft wheels car-airless tire
Rating: 7.9219
Filesize: 480.01 kB
Downloads: 1912
Comments: 10
Ratings: 64
Date added: 2008/06/13 15:57:11
Made with: Phun
Rating: rated 7.9
download
Title: Offroad tires for the collab
Rating: 6
Filesize: 130 kB
Downloads: 672
Comments: 4
Ratings: 3
Date added: 2009/07/09 03:57:39
Made with: Phun
Rating: rated 6
download
Title: Realistic Tire Fixed
Rating: 4.8333
Filesize: 368.19 kB
Downloads: 417
Comments: 3
Ratings: 6
Date added: 2008/06/06 03:13:16
Made with: Phun
Rating: rated 4.8
download
Title: 1977 Chevrolet K-30
Rating: 5.625
Filesize: 238.69 kB
Downloads: 738
Comments: 1
Ratings: 2
Date added: 2011/09/20 22:21:45
Made with: Phun
Rating: rated 5.6
download
Pretty Cool:)
Nice work. I changed the code to:

vCalc := _abs(radius * angVel);
vAbs := math.vec.len(vel);
vAbs > 0.01 ? {
r := vCalc / vAbs;
r < 0.99 || r > 1.01 ? {
_dyna = true;
friction = 0.5;
color = [1, 0.3, 0.3, 1]
} : {
_dyna = false;
friction = 1;
color = [0.3, 0.3, 0.3, 1]
}
} : {
_dyna = false;
friction = 1;
color = [0.3, 0.3, 0.3, 1]
}

This code takes into account hills by calculating the total velocity. It defaults to no slipping below 0.01 m/s, otherwise tires go red on 1% slippage.
Last edited at 2017/03/16 23:26:34 by s_noonan
I didn't want to do that because the wheels would lose traction if they go up suddenly (like a bump on the road: the velocity would be added but the wheel's velocity would be the same) or if they are in the air (but this probably would make them slip if you keep accelerating in the air anyways). But I think I'll do some tests anyways
I agree with your observation that a step velocity change will be perceived as slippage.

Other than that, both of our approaches are similar. My limits are based off of the velocity ratio while yours are based off of velocity difference. At any rate, I like your use of "math.toInt(vCalc - vAbs) == 0". That is a concise way of setting bidirectional limits without having to worry about either velocity being close to, or equal to, zero. As you probably know, you could scale that line of code like "math.toInt(10.0 * (vCalc - vAbs)) == 0" to set tighter limits.