Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

make mesh follow wheel collider unity

public WheelCollider wheelCollider;
public Transform wheelModel;

void Update()
{
    Vector3 wheelPosition;
    Quaternion wheelRotation;
    wheelCollider.GetWorldPose(out wheelPosition, out wheelRotation);
    wheelModel.position = wheelPosition;
    wheelModel.rotation = wheelRotation;
}
 
PREVIOUS NEXT
Tagged: #mesh #follow #wheel #collider #unity
ADD COMMENT
Topic
Name
6+5 =