|
1 | 1 | # Simple Camera Controller
|
2 |
| -A Unity asset providing a basic camera control system for 3D games. |
| 2 | +A Unity asset providing smooth and customizable camera controls for 3D games, including the ability to follow specific objects upon clicking them. |
3 | 3 |
|
4 | 4 | ## Features
|
5 |
| -- Smooth camera movement using the mouse and the keyboard. |
6 |
| -- Customizable settings for speed and boundaries. |
7 |
| - |
| 5 | +- **Smooth Camera Movement**: Control the camera with mouse and keyboard input. |
| 6 | +- **Plug-and-Play**: Simple integration—drag and drop into your scene. |
| 7 | +- **Customizable Settings**: Easily adjust speed and position limits. |
| 8 | +- **Follow Objects**: Configure objects to be followable. |
| 9 | + |
8 | 10 | ## Installation
|
9 | 11 | 1. Download the `CameraController.unitypackage` file from this repository.
|
10 |
| -2. Open Unity and go to **Assets > Import Package > Custom Package**. |
11 |
| -3. Select `CameraController.unitypackage` and click **Import**. |
| 12 | +2. Open your Unity project and navigate to **Assets > Import Package > Custom Package**. |
| 13 | +3. Select the `CameraController.unitypackage` file and click **Import**. |
12 | 14 |
|
13 | 15 | ## How to Use
|
14 |
| -1. After importing, drag the `CameraRig` prefab into your scene. |
15 |
| -2. Adjust the properties in the Inspector: |
16 |
| - - Rotation speed. |
17 |
| - - Position boundaries. |
| 16 | +1. Import the asset as described above. |
| 17 | +2. Drag the `CameraController` prefab into your scene. |
| 18 | +3. Configure the camera in the **Inspector**: |
| 19 | + - Adjust movement speed and limits. |
18 | 20 |
|
19 |
| -### Example Code |
20 |
| -```csharp |
21 |
| -public class ExampleUsage : MonoBehaviour { |
22 |
| - void Start() { |
23 |
| - Debug.Log("Camera Controller is ready to use!"); |
24 |
| - } |
25 |
| -} |
| 21 | +### Configuring Followable Objects |
| 22 | +To enable the "follow object" feature: |
| 23 | +1. Attach the `CameraFollowController` script to any object you want the camera to follow. |
| 24 | +2. When the object is clicked during gameplay, the camera will dynamically track it |
0 commit comments