Answers for "make mesh follow wheel collider unity"

C#
1

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;
}
Posted by: Guest on July-20-2021

C# Answers by Framework

Browse Popular Code Answers by Language