Name: Controllable Camera
By AdamO on Discord
A package that allows you to possess and control (i.e. rotate) cameras in the world easily, with smooth movement.
- Install the “Controllable Camera” package into your game.
- Place the example “ControllableCameraSystem” template into your game.
- Add the “UserCameraControl” and “LocalHandler” script folders to your User template.
- Play the game and go interact with the camera system’s button to possess the camera!
Note: The camera is set up to use “left”, “right”, “up” and “down” buttons to rotate, i.e. WASD or the left stick on controller. You can change these to any of the available inputs in the UserCameraControl’s properties.
You can set up your own cameras, by adding the “controllableCameraScript” to them and then hooking into the “Possess” function, which will take either a player or user and possess that camera.
You can choose whether or not to constraint horizontal (yaw) and vertical (pitch) rotation, how much to constrain it by, the turn speed, acceleration and deceleration, and whether the camera’s rotation will reset when you exit it.
Love this so much, thank you so much for making it. I’ve used it on 3 rides in Paintball Park and it adds so much.
One feature request please. Can you include the option to hide the player, players on held items, and the Player Crosshair when ever you activate the cameras please. And reset when you come back to your player?
Will stick it on my todo list
Take a look now, should have options added for those 3 things. The held inventory item one may not be perfect, I think if a player changes inventory slot while in the camera, the item will show up again but that’s a slightly tricky case since the visibility isn’t hierarchical.
Amazing, thanks alot for sorting this so quickly for me. It was very weird in the game to be looking at your own character whilst riding a ride. This is such a brilliant package, thank you
I’m trying to create a Controllable Turret and I think this Package would be useful. I have created a Locator for the Turret, added the Camera inside and added the Turret (Geo/Meshes) as a child of the Camera, so that it rotates along with the Camera.
But I noticed that even if the Round Starts/Lobby Ends/Player Dies the Camera Possession doesn’t end. It looks like the Player controls the Camera forever if they’re interrupted in this way while interacting with it. Do you know how I can solve this?
Hi Varun, I’ve just published an update to this package which makes sure you stop controlling the camera if something else takes you away from it (like your player being respawned, e.g. by the game control).
Also, reading how you wanted to use this package, I realised it probably wouldn’t work for your game because it just moves the camera on the client. This gives smooth movement but means it’s only moving for you - other players won’t see it. This is ideal for something like a CCTV / spectate camera, but probably not for your turret game. So I also added a property on the controllable camera, “onClient” - if you untick this, then the camera will update the same for everyone. But it won’t be quite as smooth because it’s moving on the server, not the client.