|
| 1 | +# Multi Target Camera Controller |
| 2 | +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. |
| 3 | + |
| 4 | +## Features |
| 5 | +- **Follow Multiple Targets**: Track multiple objects at once with smooth camera transitions. |
| 6 | +- **Dynamic Camera Height**: The camera adjusts its height based on the distance between the targets. |
| 7 | +- **Smooth Camera Movement**: Camera transitions smoothly between positions using a customizable smoothing factor. |
| 8 | +- **Height Limitations**: Apply configurable minimum and maximum height limits to the camera. |
| 9 | +- **Customizable Settings**: Easily adjust offset, smooth time, and camera height settings to fit the needs of your game. |
| 10 | + |
| 11 | +## Installation |
| 12 | +1. Download the `MultiTargetCameraController.unitypackage` file from this repository. |
| 13 | +2. Open your Unity project and go to **Assets > Import Package > Custom Package**. |
| 14 | +3. Select the `MultiTargetCameraController.unitypackage` file and click **Import**. |
| 15 | +4. After importing, attach the `MultiTargetCameraController` script to your main camera in the scene. |
| 16 | + |
| 17 | +## How to Use |
| 18 | +1. Import the asset by following the installation steps above. |
| 19 | +2. Attach the `MultiTargetCameraController` script to your camera by selecting the camera in the scene and clicking **Add Component**. |
| 20 | +3. In the **Inspector**, configure the following parameters: |
| 21 | + - **Targets**: Add the objects you want the camera to follow by dragging them into the **Targets** array. |
| 22 | + - **Offset**: Adjust the offset from the center of the targets to set the camera's initial position. |
| 23 | + - **Smooth Time**: Set the smooth transition time for camera movement. |
| 24 | + - **Height Settings**: Set the minimum and maximum height of the camera and enable/disable height limit. |
| 25 | +4. The camera will automatically adjust to follow all assigned targets and maintain an appropriate height based on their distance. |
| 26 | + |
| 27 | +## License |
| 28 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
0 commit comments