{"id":13663975,"url":"https://github.com/lopespm/unity-camera-multi-target","last_synced_at":"2025-04-25T20:31:55.046Z","repository":{"id":71384931,"uuid":"163119544","full_name":"lopespm/unity-camera-multi-target","owner":"lopespm","description":"Unity library to dynamically keep multiple objects in camera view","archived":false,"fork":false,"pushed_at":"2025-03-03T22:21:39.000Z","size":1513,"stargazers_count":220,"open_issues_count":2,"forks_count":21,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-03T23:23:13.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lopespm.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}},"created_at":"2018-12-26T00:27:56.000Z","updated_at":"2025-03-03T22:54:03.000Z","dependencies_parsed_at":"2023-03-23T17:04:10.715Z","dependency_job_id":null,"html_url":"https://github.com/lopespm/unity-camera-multi-target","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopespm%2Funity-camera-multi-target","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopespm%2Funity-camera-multi-target/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopespm%2Funity-camera-multi-target/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopespm%2Funity-camera-multi-target/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lopespm","download_url":"https://codeload.github.com/lopespm/unity-camera-multi-target/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250890612,"owners_count":21503523,"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":[],"created_at":"2024-08-02T05:02:42.663Z","updated_at":"2025-04-25T20:31:55.041Z","avatar_url":"https://github.com/lopespm.png","language":"C#","readme":"# Dynamic Multi Target Camera for Unity\n\nConcise Unity library which dynamically keeps a set of objects (e.g. players and important objects) in view, a common problem for a wide range of games. \n\nThe library was originally developed for, and used by [Survival Ball](https://survivalball.com/), a game with a heavy shared screen local co-op component, requiring the camera to dynamically keep many key elements in view. More information about the library's inner workings and underlying math in the related [blog article](https://lopespm.github.io/libraries/games/2018/12/27/camera-multi-target.html).\n\n[\u003cimg src=\"https://user-images.githubusercontent.com/3640622/71978096-714ea100-3212-11ea-9480-cbc0ce33df4a.png\"\n      alt=\"Get it for free on the Unity Asset Store\"\n      height=\"80\"\u003e](https://assetstore.unity.com/packages/tools/camera/camera-multi-target-dynamic-135922)\n\n[\u003cimg src=\"https://user-images.githubusercontent.com/3640622/50427650-c2108780-08a5-11e9-9db0-d69e9fa329c1.gif\" alt=\"Camera Multi Target Example Scene Video\"\u003e](https://www.youtube.com/watch?v=In3eVapQ5mk)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/3640622/50427667-19165c80-08a6-11e9-9306-6d05f7477262.jpg\" alt=\"Camera Multi Target Example Scene Screenshot\"\u003e\n\n\n## Install\n\n### From Unity's Asset Store\n\nAvailable at https://assetstore.unity.com/packages/tools/camera/camera-multi-target-dynamic-135922. Via Unity Editor, download and import the CameraMultiTarget folder into your project.\n\n### By importing CameraMultiTarget.unitypackage\n\nThe pre-built package can be downloaded from the repository's releases [here](https://github.com/lopespm/unity-camera-multi-target/releases/latest). After downloading the package, import it to your project via Unity Editor: *Assets -\u003e Import Package -\u003e Custom Package..*.\n\n### Or by cloning this repository\n\n#### Clone entire repository (git)\n\nThis repository contains the complete Unity project which includes the library and an example usage scene. After you clone the entire repository using git, copy the *Assets/CameraMultiTarget* folder to your project\n\n    git clone https://github.com/lopespm/unity-camera-multi-target.git\n\n#### Checkout specific features (SVN)\n\nSince cloning a specific folder can be a quite convoluted process via git, you can checkout the *Assets/CameraMultiTarget* folder directly to your project using SVN:\n\n    cd \u003cyour_project_root_folder\u003e\n    svn checkout https://github.com/lopespm/unity-camera-multi-target/trunk/Assets/CameraMultiTarget Assets/CameraMultiTarget\n\nOr if you wish to only install the library without the example scene:\n\n    cd \u003cyour_project_root_folder\u003e\n    svn checkout https://github.com/lopespm/unity-camera-multi-target/trunk/Assets/CameraMultiTarget/Library Assets/CameraMultiTarget/Library\n\n\n## Usage\n\nAdd the [`CameraMultiTarget`](Assets/CameraMultiTarget/Library/CameraMultiTarget.cs) component to a camera and then you can programatically set which game objects the camera will track via the component's [`SetTargets(GameObject[] targets)`](Assets/CameraMultiTarget/Library/CameraMultiTarget.cs#L23) method.\n\nFor example, you can set the targets in your game controller component (if you choose to have one), like the following:\n\n    public class ExampleGameController : MonoBehaviour\n    {\n        public Rockbyte.CMT.CameraMultiTarget cameraMultiTarget;\n    \n        private void Start() {\n            var targets = new List\u003cGameObject\u003e();\n            targets.Add(CreateTarget());\n            targets.Add(CreateTarget());\n            targets.Add(CreateTarget());\n            cameraMultiTarget.SetTargets(targets.ToArray());\n        }\n\n        private GameObject CreateTarget() {\n            GameObject target = GameObject.CreatePrimitive(PrimitiveType.Capsule);\n            target.transform.position = Random.insideUnitSphere * 10f;\n            return target;\n        }\n    }\n\n\n## Example Scene\n\nAn example scene of the library's usage is included in this repository and in the pre-built package located in the repository's releases.\n\n## Games using Dynamic Multi Target Camera\n\n- [Survival Ball](https://survivalball.com/)\n\n*Did you develop, or know about, a game using this library? Add it here via [pull request](https://github.com/lopespm/unity-camera-multi-target/pulls)*\n","funding_links":[],"categories":["C\\#","Open Source Repositories","Open Source Packages","Camera"],"sub_categories":["Camera","Reactive"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flopespm%2Funity-camera-multi-target","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flopespm%2Funity-camera-multi-target","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flopespm%2Funity-camera-multi-target/lists"}