why my car is jump???
how can i canfigur whelli collider?
I honestly am having a hard time what your problem is, could you elaborate?
when I play car down on the Trrein and jump , I dont indrestend why?
I don't indrestend either. Try to use RigidBody.AddForce
What are you trying to do, exactly and what is your problem?
This is not a question. Please provide more context, information, what you have tried already, etc. Not providing sufficient information makes it difficult for people to solve your problem and may lead to your question being closed for not following user guidelines.
I have installed Rigidbody, WhelliColliders, and write script, but when i play my car is jump ...(using UnityEngine; using System.Collections;
public class $$anonymous$$oveScript : $$anonymous$$onoBehaviour {
public WheelCollider[] frontCols;
public Transform[] dataFront;
public WheelCollider[] backCol;
public Transform[] dataBack;
public float maxSpeed = 30f;
private float sideSpeed = 30f;
public float breakSpeed = 100f;
void Start()
{
}
void Update()
{
/** Get axis **/
float vAxis = Input.GetAxis("Vertical");
float hAxis = Input.GetAxis("Horizontal");
bool brakeButton = Input.GetButton("Jump");
/** End get axis **/
/** $$anonymous$$otor **/
frontCols[0].motorTorque = vAxis * maxSpeed;
frontCols[1].motorTorque = vAxis * maxSpeed;
/** End motor **/
/** Brake **/
if (brakeButton)
{
frontCols[0].brakeTorque = $$anonymous$$athf.Abs(frontCols[0].motorTorque) * breakSpeed;
frontCols[1].brakeTorque = $$anonymous$$athf.Abs(frontCols[1].motorTorque) * breakSpeed;
}
else
{
frontCols[0].brakeTorque = 0;
frontCols[1].brakeTorque = 0;
}
/** End brake **/
/** Rotate **/
frontCols[0].steerAngle = hAxis * sideSpeed;
frontCols[1].steerAngle = hAxis * sideSpeed;
/** End rotate **/
/** Update graphics cols **/
dataFront[0].Rotate(0, 0, -frontCols[0].rpm * Time.deltaTime);
dataFront[1].Rotate(0, 0, -frontCols[1].rpm * Time.deltaTime);
dataBack[0].Rotate(0, 0, -backCol[0].rpm * Time.deltaTime);
dataBack[1].Rotate(0, 0, -backCol[1].rpm * Time.deltaTime);
dataFront[0].localEulerAngles = new Vector3(dataFront[0].localEulerAngles.x, hAxis * sideSpeed, dataFront[0].localEulerAngles.z);
dataFront[1].localEulerAngles = new Vector3(dataFront[1].localEulerAngles.x, hAxis * sideSpeed, dataFront[1].localEulerAngles.z);
}
} / End update graphics cols */ )
Answer by ragnaros100 · Oct 26, 2016 at 09:24 AM
I just matched your settings in a new project. Yes. The car jumps like crazy. You should change your rigidbody settings. The wheel collider looks for the rigidbody mass. I assume your rigidbody mass is at the standard 1. Try to set it to 2000 instead. A regular car usually weighs around 1-2 metric tons, not 1 kilo.
Hope this helps :)
I ins$$anonymous$$d 2000 but , all the same my car is jump.(((
Try to follow the steps Here and please improve your english skills. You are very difficult to understand.
Your answer