Quantcast
Channel: Questions in topic: "wheelcollider"
Viewing all articles
Browse latest Browse all 490

My car simplicity do not work..

$
0
0
Hello! I did a script for a car and before it worked well, now I do not know what happened and it just does not start, it does not turn or anything, what happened? help! Thank you using UnityEngine; using System.Collections; public class Auto : MonoBehaviour { public WheelCollider ColliderDI; public WheelCollider ColliderDD; public WheelCollider ColliderTI; public WheelCollider ColliderTD; public int Aceleracion; private float DesAceleracion; public GameObject LucesDeFreno; void Start () { transform.rigidbody.centerOfMass = new Vector3(0,0,0); } void FixedUpdated () { //Aceleracion de el auto float torque = Aceleracion; ColliderDI.motorTorque = Input.GetAxis("Vertical") * torque; ColliderDD.motorTorque = Input.GetAxis("Vertical") * torque; //Girar las ruedas de el auto ColliderDI.steerAngle = 15 * Input.GetAxis("Horizontal"); ColliderDD.steerAngle = 15 * Input.GetAxis("Horizontal"); } }

Viewing all articles
Browse latest Browse all 490

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>