- Home /
How to display the wheel collider gizmos always?
Hi, how to display the wheel collideralso if not selected? For example, if I select my wheel mesh I want to see the wheel collider.
I think the wheelcollider uses OnDrawGizmosSelected in the build-in script.
Answer by Esteem · Oct 22, 2018 at 04:03 PM
do you have your collider component expanded in the inspector window?
when you collapse the collider component Unity also hides it in Scene view
Yes. The problem is, that the gameobject with the wheel collidor must be selected. Only selected wheel colliders are visible. I want to display it always. For example I I select another game object like the wheel meshes.
well one way to do this is to put the colliders on the same object as the wheel meshes.
Other way is to make a custom editor button that will load all colliders in the scene (possibly based on some filter input like a object name or whatnot) and draw custom geometry for those colliders but that sounds like a lot of pain for not much gain.
if you're okay with approximate representation you can make a script with OnDrawGizmos() method and Gizmos.DrawSphere in there based on the size of those colliders, that way they'll always be visible.
(or if you have a script on those colliders you can put the method in there as well, it just has to inherit from $$anonymous$$onoBehaviour)
Your answer

Follow this Question
Related Questions
Wheel Collider Gearbox 0 Answers
Gizmos Folder In Build 1 Answer
Camera.main.pixel incorrectly return scene view's size in OnDrawGizmos 0 Answers
Draw out alot of gizmos 0 Answers
Draw line on play gets distorted 1 Answer