How do I make a camera follow a vehicle body?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Winafresh

In the tutorial here on youtube, I can’t make out the code to write the script to make the camera follow the car.

The camera is a child node of yout car, isn’t it? Have you checked “current” property in the camera inspector?

p7f | 2018-12-02 00:58

:bust_in_silhouette: Reply From: Gatada

I highly recommend downloading the 3D Truck Town Demo from the Asset Library Projects. It shows you at least one way to make the camera follow the car.

As I’m using Version 4 alpha, I had to download earlier version (3.5) to gain access to the demo. Then I moved and updated the needed script(s) to my own project.