Car lights are fairly simple, I would suggest using the Standard Assets Projector (use the light one) and just outfit it to the front of the car and set it's distance. Make sure it is set to not show on the layer that the vehicle is on and you are set. As far as the rearview. I kind of wanted to know it myself and I knew that somewhere on this site there was a MiniMap tutorial. This is exactly the same as a rear view mirror, you just position the camera to make it work. I found the tutorial here: http://www.moddb.com/games/caredu/tutorials/how-to-make-a-minimap
I think the official Unity Car tutorial has a rear view for the Player Car. You should check it out how they do it.
Just for clarification and if anyone finds this using the search for Minimap... this is adapted code for that tutorial: Code (csharp): var target : Transform; var damping = 6.0; var smooth = true; var height = 90.0; function LateUpdate () { if (target) { if (smooth) { // Look at and dampen the rotation //var rotation = Quaternion.LookRotation(target.position - transform.position); var originalRotation=transform.rotation; transform.LookAt(target, target.TransformDirection(Vector3.forward)); transform.rotation = Quaternion.Slerp(originalRotation, transform.rotation, Time.deltaTime * damping); } else { // Just lookat transform.LookAt(target, target.TransformDirection(Vector3.forward)); } transform.position = target.position + Vector3(0,height,0); } } function Start () { // Make the rigid body not change rotation if (rigidbody) rigidbody.freezeRotation = true; } I found the original code to be rather jerky.
Question would be is how to reverse the X of the camera, so that it actually looks like it's mirrored?
http://i30.tinypic.com/14uky9u.jpg see mirror on top that i want to make i made it, thanks BigMisterB
Thats actually pretty easy, the same script, but you don't update the camera position each frame. and link it to the vehicle's root transform. Recant..... Dont put the mini map script on it..
And I found the Invert script to make it mirror correctly... http://www.unifycommunity.com/wiki/index.php?title=InvertCamera