• Create Account

### #Actualjujunosuke

Posted 05 October 2012 - 12:30 AM

About suspension and weight transfer, i don't know if the solution i used can help any of you guys.
It is just a simplification of the concept, but honestly, i got pretty decent result and my simulation got better.

As kunos said, i use physX as my physics engine, with 5 rigid body connected with joints.
Basically i calculate the spring compression based on the distance of center of my wheel to the distance of my spring attached to the body of the car.
You can decide about the spring distance free height. I set mine to 0.36 meters.
That mean, if the car body is 0 kg the spring should not be compressed and give you 0.36 meters.

Then i just do some calculation of the distance. Vector3 of the center of the wheel, Vector3 of the joint position.
I then make calculation to get a result between 0 and 1.

0 mean that the spring is stretched to the max and give 0 grip. (spring free height)
1 mean that the spring is compressed to the max and give 100 % of grip.

once you made that, calculate the total force that your tire should provide and multiply it by the result of the spring compression.

Works decently for me and was really simple to implement.
But of course, this technique is valuable only if you use a 3d physics engine as mentioned.

### #3jujunosuke

Posted 04 October 2012 - 08:28 PM

About suspension and weight transfer, i don't know if the solution i used can help any of you guys.
It is just a simplification of the concept, but honestly, i got pretty decent result and my simulation got better.

As kunos said, i use physX as my physics engine, with 5 rigid body connected with joints.
Basically i calculate the spring compression based on the distance of center of my wheel to the distance of my spring attached to the body of the car.
You can decide about he spring distance free height. I set mine to 0.36 meters.
That mean, if the car body is 0 kg the spring should not be compressed and give you 0.36 meters.

Then i just do some calculation of the distance. Vector3 of the center of the wheel, Vector3 of the joint position.
I then make calculation to get a result between 0 and 1.

0 mean that the spring is stretched to the max and give 0 grip.
1 mean that the spring is compressed to the max and give 100 % of grip.

once you made that, calculate the total force that your tire should provide and multiply it by the result of the spring compression.

Works decently for me and was really simple to implement.
But of course, this technique is valuable only if you use a 3d physics engine as mentioned.

### #2jujunosuke

Posted 04 October 2012 - 08:26 PM

About suspension and weight transfer, i don't know if the solution i used can help any of you guys.
It is just a simplification of the concept, but honestly, i got pretty decent result and my simulation got better.

As kunos said, i use physX as my physics engine, with 5 rigid body connected with joints.
Basically i calculate the spring compression based on the distance of center of my wheel to the distance of my spring attached to the body of the car.
You can decide about he spring distance free height. I set mine to 0.36 meters.
That mean, if the car body is 0 kg the spring should not be compressed and give you 0.36 meters.

Then i just do some calculation of the distance. Vector3 of the center of the wheel, Vector3 of the joint position.
I then make calculation to get a result between 0 and 1.

0 mean that the spring is stretched to the max and give 0 grip.
1 mean that the spring is compressed to the max and give 100 % of grip.

once you made that, calculate the total force that your tire should provide and multiply it by the result of the spring compression.

Works decently for me and was really simple to implement.
But of course, this technique is valuable only if you use a 3d physics engine as mentioned.

### #1jujunosuke

Posted 04 October 2012 - 08:24 PM

About suspension and weight transfer, i don't know if the solution i used can help any of you guys.
It is just a simplification of the concept, but honestly, i got pretty decent result and my simulation got better.

As kunos said, i use physX as my physics engine, with 5 rigid body connected with joints.
Basically i calculate the spring compression based on the distance of center of my wheel to the distance of my spring attached to the body of the car.
You can decide about he spring distance free height. I set mine to 0.36 meters.
That mean, if the car body is 0 kg the spring should not be compressed and give you o.36 meters.

Then i just do some calculation of the distance. Vector3 of the center of the wheel, Vector3 of the joint position.
This give me a result between 0 and 1.

0 mean that the spring is stretched to the max and give 0 grip.
1 mean that the spring is compressed to the max and give 100 % of grip.

once you made that, calculate the total force that your tire should provide and multiply it by the result of the spring compression.

Works decently for me and was really simple to implement.
But of course, this technique is valuable only if you use a 3d physics engine as mentioned.

PARTNERS