0 votes
by
edited by
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.
by
Thank you for the detailed report. Which edition of Vehicle Physics Pro are you using? (Community/Professional/Enterprise).
by
edited by
Community 9.5.9021.31941

1 Answer

0 votes
by
The Community Edition of Vehicle Physics Pro doesn't support custom vehicle controllers, such as SimpleVehicleController.cs. In this edition vehicles must use the provided vehicle controller component (VPVehicleController). Custom vehicle controllers are supported in the Professional and Enterprise editions only.

When using a custom vehicle controller in Vehicle Physics Pro CE, wheels aren't properly initialized and the vehicle controller is disabled as a result. We've noted this issue and will fix it so VPP shows a proper error when trying to use a custom vehicle controller with VPP CE.
...