playMaker

Author Topic: Wheel Colliders, which I control using PlayMaker, behave strangely  (Read 348 times)

alexsecl

  • Playmaker Newbie
  • *
  • Posts: 8
Hi everyone! When I created the car and set up the control with FSM PlayMaker, I noticed a strange behavior of the wheels. Their rotation was not stable. Sometimes the wheels would stand still or spin the other way, even though the car was moving forward. Check out the video on drive.google (this moment starts at 27 seconds) :

https://drive.google.com/file/d/1KHYd8g68TmBx8UXphyz8FvbtaQ2RoR6Q/view?usp=sharing

I added an RPM to each wheel collider to look at the values. Take a look for yourself:

https://drive.google.com/file/d/11SJrm_zvuqHBO8VOJDrCsWBraA3Pr56o/view?usp=sharing

It was weird. I thought I made a mistake somewhere with the FSM build and decided to make a new test-project with a simple car and with a minimum of FSM. Just forward and backward movement of the wheel colliders.
And to my surprise the same problem was there. Check out the video, I recorded the Unity window in full so you can see everything I did. Check out the video:

https://drive.google.com/file/d/1S50m8MYl6J2J2y9yrSFYX78L7qXUGi05/view?usp=sharing

This is not an optical illusion due to the difference in frame refresh rate and wheel rotation. The wheel stutters, stops, starts spinning the other way and it is clearly visible when you start driving the car. This can be seen in the RPM of wheel colliders. Aren't they supposed to smoothly change RPMs depending on speed? Instead, the RPM values jump around chaotically, creating a chaotic wheel spin.

What could be my problem with this? Hoping for a solution.


alexsecl

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Wheel Colliders, which I control using PlayMaker, behave strangely
« Reply #1 on: March 08, 2024, 07:33:36 AM »
The problem with wheel colliders was solved.
It turned out that it was affected by the mass of the wheel colliders. I have a heavy truck (mass 2500). And the colliders had a default mass of 10 kg. The radius of a wheel collider is 0.38, which means the wheel has a diameter of 0.76 meters. That's a big wheel, and it can't weigh 10 kilograms.
I set the wheel collider mass to 40 kilograms and everything became perfect.