Hi!
I was learning about WheelColliders, I’ve tried to make some CarController from YT tutorial, but while doing all of them I had the same issue. WheelColliders are looking well, but the WheelMeshes are being rotated badly. The following code snippet is from that tutorial (if anyone cares): Unity 5 - Car Wheel Collider Tutorial + Blender Meshes - YouTube
public class CarController : MonoBehaviour
{
public WheelCollider[] wheelColliders = new WheelCollider[4];
public Transform[] wheelMeshes = new Transform[4];
void UpdateMeshesPositions()
{
for (int i = 0; i < 4; i++)
{
Quaternion quat;
Vector3 pos;
wheelColliders*.GetWorldPose(out pos,out quat);*
wheelMeshes*.transform.position = pos;*
wheelMeshes*.transform.rotation = quat;*
}
}
void FixedUpdate()
{
UpdateMeshesPositions();
}
}
The result of running that Script is on the attache Image.
[72614-wheelcolliderissue.png|72614]
I don’t know what is making that bug, is this WheelCollider Component’s fault or something else?
How can I fix this?
I would be very grateful for any help or advice!
I would be
Yes, because that's what happens when two objects collide. Make the mass of your projectile smaller if you want it to apply less force.
– tanoshimi