Author Topic: Dampening vehicle collisions  (Read 3325 times)

Is it possible to make blockland vehicle collisions less severe with VehicleData's bodyFriction & bodyRestitution?

It seems it could be done given the info below.


I'd try this right away if I had a laptop handy.

It should be. The majority of BL vehicles are coded very poorly. Note that the default Jeep never spins off into space.

I found that by making bodyFriction 0.0 and bodyRestitution 0.1, superkarts don't space launch when they collide, don't get stuck together as much, and actually bounce off each other in a way that would make you believe momentum is conserved.

in other words, superkart gamemode will be more epic than speedkart :]
« Last Edit: November 11, 2014, 05:01:54 PM by Farad »

I found that by making bodyFriction 0.0 and bodyRestitution 0.1, superkarts don't space launch when they collide, don't get stuck together as much, and actually bounce off each other in a way that would make you believe momentum is actually conserved.

in other words, superkart gamemode will be more epic than speedkart :]
0.0 is the same as 0. Did I just blow your mind?

Is noooooot. 0.0 is a float value and 0 is an integer value.

Is noooooot. 0.0 is a float value and 0 is an integer value.
Does that matter much in Torquecript though?
I thought Torquescript didn't care about types like at all.

Does that matter much in Torquecript though?
I thought Torquescript didn't care about types like at all.
I noticed that instead of .1 I had to put 0.1 to avoid a syntax errorr

Does that matter much in Torquecript though?
I thought Torquescript didn't care about types like at all.

It matters so little (in most areas) that the parser converts "0.0" into "0".

==>echo(0.0);
0
==>echo(0.0 $= 0);
1
==>echo("0.0" $= 0);
0
==>echo("0.0" == 0);
1
==>echo("0.0" + "0.0");
0
==>echo("0.0" + "0.0" == "0");
1

After more testing, I noticed that changing bodyFriction and bodyRestitution don't seem to make much of a difference in an online server. I can only observe improvement in single-player.

Any other ideas on how to allow vehicles to collide without getting stuck or launching far away?
Maybe some code that can tell when vehicles are about to collide, so it can push them away before they actually hit.
« Last Edit: November 15, 2014, 04:37:08 PM by Farad »

After more testing, I noticed that changing bodyFriction and bodyRestitution don't seem to make much of a difference in an online server. I can only observe improvement in single-player.

Oh yeah. Most of the problems with vehicle physics are a problem with the networking.