|Topic was automatically imported from the old Question2Answer platform.
I am trying to create a driving mechanic but I just cannot seem to make the vehicleBody node work. Here is my setup:
I created a world scene that has a CSGBox with the collision enabled, just to have some kind of floor.
Then I created another scene that has a VehicleBody as the root node and 4 VehicleWheels as children, with each of them having an appropriate Mesh attached. The mesh for each wheel is a child of the respective VehicleWheel node, they are in the same place and the only attribute I changed of the VehicleWheel nodes was the radius to make them the same size as the wheels.
This scene was then instanced into the level scene. (I also added a camera, but I suppose that doesn’t matter to the car)
Once I tried to run all of this I encountered a lot of problems:
First, the body of the car would be too heavy and drop all the way to the floor. Also, the wheels would clip partially through the floor. I tried to address this by adjusting the rest length of each wheel. This did make the wheels kinda work, although each wheel would still clip through the floor a tiny bit. But now the car would be very unstable and tilt forwards. Especially confusing was that even though the different wheels had the same rest length, the car still wobbled forwards.
I tried to play with the other attributes of the wheels, but none seemed to fix the issues and there doesn’t seem to be a detailed guide on how the VehicleBody works, or at least I couldn’t find one…
My questions would be:
- Does the radius of the VehicleWheel node need to be the same as the mesh it surrounds and does it need to be in the center of it (as opposed to being on the outer or inner side of it)?
- Did the car in my game wobble because I need to experiment for each wheel’s rest length and find the perfect balance or is there an easier way?
- Is there a decent guide online that explains how the VehicleBody works? That would be insanely helpful.
Edit: Here are pictures of my setup
can you provide a screenshot of the setup and of the sceneTree? With the given informations the answer can only be very vague.
klaas | 2020-09-27 17:54
Hi, thanks for the help.
1izNoob | 2020-10-01 09:40
just figured out how to add images, they are added now to the original post
1izNoob | 2020-10-01 09:51
I have the same issue. Have found an answer to your Q? I watched the samevideo and even downloaded the guys version from github. It has this problem too. I am thinking maybe this is an environemtn related problem.
istemihan | 2021-05-09 11:11