Hello
this is a piece of the boatscript from the vehicles examples. Im trying to access the damping aspect of the smooth follow script. This (see last line) doesnt cut it even though the colours look right in unitron. Couldnt find any script ref on this:
Variable names in JavaScript and C# can’t have spaces in them. So you’re looking for heightDamping. You can see it in Assets/Standard Assets/Camera Scripts/SmoothFollow.js line 19. Also, doing GetComponent over and over isn’t very efficient. It’d also look cleaner if you just did this:
function SetupCamera() {
var smoothFollow = Camera.main.GetComponent(SmoothFollow);
if (smoothFollow) {
smoothFollow.enabled = true;
smoothFollow.target = transform;
smoothFollow.distance = 35;
smoothFollow.height = 12;
smoothFollow.heightDamping = 3;
}
}