- Home /
Unity car tutorial - car at zero speed = jittery camera
Anyone noticed this with the Unity car tutorial, with CarCamera.cs attached to main camera?
It seems their car in the demo is always moving even when their speed is at 0, but when you force it to a stop, the rotation damping /velocity plays a part in messing things up (Only what I can assume)
Does anyone know how to just stop the camera moving once the vehicle has stopped?
Answer by Loius · Oct 21, 2012 at 07:31 PM
If the vehicle is set to an exact value to stop it (i.e., vehicle.velocity = Vector3.zero), you can test for that before doing anything to the camera.
If not, you can test for very low velocity:
if ( vehicle.velocity.sqrMagnitude > 0.2 ) MoveCamera(); else { }
Your answer
Follow this Question
Related Questions
How can i rotate my car steering wheel in accordance to the wheels? 1 Answer
Creating a SIMPLE car. 1 Answer
game speed in the car tutorial track 1 Answer
How add kilometre per hour system in car script,how to add kilometre per hour speed system in script 0 Answers
Various obsolete warnings in cs and js scripts in unity car tutorial 1 Answer