I am encountering an issue with the VehiclePhysics plugin while working on a project using the SimpleVehicleController for vehicle control. The specific error I am facing is:
Invalid wheel properties (radius and/or mass) for wheel[0]
Issue Description
This error seems to be related to wheel[0] (the front-left wheel), where either the radius or mass is considered invalid. Despite making several adjustments both in the code and in Unity's editor, I have not been able to resolve this issue. Here is a summary of what I have tried so far:
Code Setup:
In the ConfigureWheelData function, I ensured that the radius is set before the mass, as per the documentation's recommendation.
Unity Editor Check:
In Unity’s editor, I have confirmed that all four wheels' VPWheelCollider objects are assigned reasonable values for radius and mass. Specifically, I set the radius to 0.35 and the mass to 50kg, but the error persists.
Attempted Solutions:
I tried setting the inertia manually in the code and also provided default values for radius and mass (0.35 for radius and 50 for mass), but neither approach resolved the issue.
I added Debug.Log statements to verify that the radius and mass values are valid during initialization, and the values are indeed being set correctly in the code.
Despite these efforts, I continue to encounter the same error, and it seems like the issue might be related to the internal handling of VPWheelCollider or the physics engine’s sequence of setting these properties.
Request for Assistance
Could you provide any guidance or suggestions on how to resolve this issue, especially regarding proper initialization of the VPWheelCollider in SimpleVehicleController? I would greatly appreciate any additional steps or insights you can offer to help troubleshoot this problem.
Thank you for your attention to this matter. I look forward to your response and any advice you might have.