https://github.com/nilmoreno128/multitargetcameracontroller-unity
A Unity script that allows the camera to smoothly follow multiple targets simultaneously.
https://github.com/nilmoreno128/multitargetcameracontroller-unity
camera-controller unity unity-camera unity-package unity-plugin unity-tool
Last synced: about 2 months ago
JSON representation
A Unity script that allows the camera to smoothly follow multiple targets simultaneously.
- Host: GitHub
- URL: https://github.com/nilmoreno128/multitargetcameracontroller-unity
- Owner: nilmoreno128
- License: mit
- Created: 2025-01-10T10:43:47.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-14T20:11:20.000Z (4 months ago)
- Last Synced: 2025-01-28T11:39:30.471Z (4 months ago)
- Topics: camera-controller, unity, unity-camera, unity-package, unity-plugin, unity-tool
- Homepage:
- Size: 10.5 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Multi Target Camera Controller

*An example of the camera following multiple targets.*A Unity script that allows the camera to smoothly follow multiple targets simultaneously. It dynamically adjusts the camera's position and height based on the number of targets, providing a smooth and immersive experience for games that need to track multiple objects at once.
## Features
- **Follow Multiple Targets**: Track multiple objects at once with smooth camera transitions.
- **Dynamic Camera Height**: The camera adjusts its height based on the distance between the targets.
- **Smooth Camera Movement**: Camera transitions smoothly between positions using a customizable smoothing factor.
- **Customizable Settings**: Easily adjust offset, smooth time, and camera height settings to fit the needs of your game.## Installation
1. Download the [`MultiTargetCameraController.unitypackage`](MultiTargetCameraController.unitypackage) file from this repository.
2. Open your Unity project and go to **Assets > Import Package > Custom Package**.
3. Select the `MultiTargetCameraController.unitypackage` file and click **Import**.
4. After importing, attach the `MultiTargetCameraController` script to your main camera in the scene.## How to Use
1. Import the asset by following the installation steps above.
2. Attach the `MultiTargetCameraController` script to your camera by selecting the camera in the scene and clicking **Add Component**.
3. In the **Inspector**, configure the following parameters:
- **Targets**: Add the objects you want the camera to follow by dragging them into the **Targets** array.
- **Offset**: Adjust the offset from the center of the targets to set the camera's initial position.
- **Smooth Time**: Set the smooth transition time for camera movement.
- **Height Settings**: Set the minimum and maximum height of the camera and enable/disable height limit.
4. The camera will automatically adjust to follow all assigned targets and maintain an appropriate height based on their distance.## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.