Hello, i have a problem that my car is “lifting” when i go. Below is animated gif. And my car has 1500 mass in rigidbody. I make very basic controller of my car there is my code:
using UnityEngine;
using System.Collections;
public class Ovladanie : MonoBehaviour {
public WheelCollider WPL;
public WheelCollider WPP;
public WheelCollider WZP;
public WheelCollider WZL;
int rychlost = 50;
// Use this for initialization
void Start () {
Vector3 centerOfMass = rigidbody.centerOfMass;
centerOfMass.y = -0.9f;
}
// Update is called once per frame
void FixedUpdate () {
WZL.motorTorque = rychlost * Input.GetAxis("Vertical");
WZP.motorTorque = rychlost * Input.GetAxis("Vertical");
WPL.steerAngle = 10 * Input.GetAxis("Horizontal");
WPP.steerAngle = 10 * Input.GetAxis("Horizontal");
}
}
Thank you for help and sorry for my english