{"id":19407646,"url":"https://github.com/bentobaux/multimode-camera-controller-in-unity","last_synced_at":"2026-02-08T22:32:12.970Z","repository":{"id":261318785,"uuid":"882824912","full_name":"bentoBAUX/Multimode-Camera-Controller-in-Unity","owner":"bentoBAUX","description":"A Unity controller that allows seamless switching between First-Person, Third-Person, and Real-Time Strategy camera modes implemented using Cinemachine. Ideal for games requiring multiple perspectives or hybrid gameplay styles.","archived":false,"fork":false,"pushed_at":"2024-11-05T22:49:40.000Z","size":776,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T09:51:17.216Z","etag":null,"topics":["character-controller","cinemachine","csharp","fps","game-dev","input-system","rts","third-person","unity","view-switch"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bentoBAUX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-03T21:12:25.000Z","updated_at":"2024-11-12T21:10:20.000Z","dependencies_parsed_at":"2024-11-05T22:39:14.301Z","dependency_job_id":null,"html_url":"https://github.com/bentoBAUX/Multimode-Camera-Controller-in-Unity","commit_stats":null,"previous_names":["bentobaux/multimode-camera-controller-in-unity"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoBAUX%2FMultimode-Camera-Controller-in-Unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoBAUX%2FMultimode-Camera-Controller-in-Unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoBAUX%2FMultimode-Camera-Controller-in-Unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentoBAUX%2FMultimode-Camera-Controller-in-Unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bentoBAUX","download_url":"https://codeload.github.com/bentoBAUX/Multimode-Camera-Controller-in-Unity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319605,"owners_count":21570427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["character-controller","cinemachine","csharp","fps","game-dev","input-system","rts","third-person","unity","view-switch"],"created_at":"2024-11-10T12:03:21.185Z","updated_at":"2026-02-08T22:32:12.479Z","avatar_url":"https://github.com/bentoBAUX.png","language":"C#","readme":"## Multimode Camera Controller in Unity\n[![Showcase video](https://github.com/bentoBAUX/Multimode-Camera-Controller-in-Unity/blob/master/Assets/Images/Thumbnail%20w%20Text.png)](https://youtu.be/8V7OshjtFNM)\n\nThis project demonstrates a versatile camera controller for Unity that enables seamless switching between First-Person, Third-Person, and Real-Time Strategy (RTS) perspectives. Ideal for games with hybrid gameplay styles, this setup provides a flexible and customizable foundation for multi-perspective experiences. \u003cbr/\u003e\n## Table of Contents\n- [Getting Started](#getting-started)\n- [Controls](#controls)\n- [How It Works](#how-it-works)\n- [Requirements](#requirements)\n- [License](#license)\n\n## Getting Started\nClone or download the project files and open it in Unity. This project is set up with Unity’s Input System, so make sure it’s installed and configured in your Unity project. Alternatively, the release is available for download, should you wish to test out the project.\n\n## Controls\n- **Sprint**: Hold \"*Shift*\" on your keyboard.\n- **Switch between First-Person and Third-Person**: Press '*C*' on your keyboard.\n- **Switch to RTS Mode**: Press '*V*' on your keyboard to switch from either FPS or TPS to RTS mode.\nEach mode is designed with unique functionality:\n\n- **First-Person View**: Offers an immersive player perspective, common in FPS games.\n- **Third-Person View**: Provides a full view of the player character, suitable for platformers and adventure games.\n- **RTS View**: A top-down, bird’s-eye view, ideal for strategy and management games.\n\n## How It Works\nThis camera controller leverages Unity's Cinemachine package and the Unity Input System for flexible and reliable camera switching. \u003cbr/\u003e \u003cbr/\u003e The setup includes:\n\n- A singleton [InputHandler](https://github.com/bentoBAUX/Multimode-Camera-Controller-in-Unity/blob/master/Assets/Script/InputHandler.cs) to manage keybinds and input checks.\n- Camera switching logic in [CameraManager](https://github.com/bentoBAUX/Multimode-Camera-Controller-in-Unity/blob/master/Assets/Script/CameraManager.cs) that adjusts the priorities of different CinemachineVirtualCamera components to control which camera is currently active. By modifying the priority, only the desired camera view is shown at any time, providing smooth transitions.\n- Different Cinemachine cameras for different views:\n    - **Third-Person View**: CinemachineFreeLook\n    - **First-Person View**: CinemachineVirtualCamera $\\rightarrow$ Body: \"Hard Lock To Target\"\n    - **RTS View**: CinemachineVirtualCamera $\\rightarrow$ Body: \"Do Nothing\" *(PS: I added some code to make sure that the player is in view when RTS is activated)*\n\n## Requirements\nThis project was made in Unity 2022.3.13f1 URP.\n- Cinemachine\n- Unity Input System package.\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/bentoBAUX/Multimode-Camera-Controller-in-Unity/blob/master/LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentobaux%2Fmultimode-camera-controller-in-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbentobaux%2Fmultimode-camera-controller-in-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentobaux%2Fmultimode-camera-controller-in-unity/lists"}