- Home /
Single Camera following multiple game objects
I am relatively new to unity development. I am trying to build a 3D racing game with multiple vehicles but a single camera. The idea is that players would try to knock each other off the track and one camera would capture all the action. I have tried a few things with the camera, for instance, the camera uses an average of all player transforms and follows it. However, this results in the camera movement being jumpy and discrete in certain places. Does there exist a better approach instead of averaging all the transforms? The game requires the camera to follow players which are within 'D' distance of the leader.
Thanks
Without code it is difficult to asses a proper solution. Are you smoothing your movements? That is using Lerp() or $$anonymous$$oveTowards() when you recalculate your camera movement?
So the camera should follow the leader or should the camera jump between the cars near the leader ?