- Home /
AI Car Problem
hai guys i have problem with my AI car...
My AI Car running backwards after collision with my car player. any ideas to fix it... this my AI car Script
Answer by Dee Va · Feb 25, 2012 at 03:13 AM
try this script for ai cars it helps in faceing headforward
//SeekSteer.js
var waypoints : Transform[]; var waypointRadius : float = 1.5; var damping : float = 0.1; var loop : boolean = false; var speed : float = 2.0; var faceHeading : boolean = true;
private var targetHeading : Vector3; private var currentHeading : Vector3; private var targetwaypoint : int; private var xform : Transform; private var useRigidbody : boolean; private var rigidmember : Rigidbody;
// Use this for initialization function Start() { xform = transform; currentHeading = xform.forward; if(waypoints.LengthComment