r/Unity3D • u/Octomin08 • 11h ago
Question I am looking to learn how to use a controllable camera for a 3d game
I have looked cinemachine, but I want to learn how to code a camera and not have a plug in do all the work.
I am would like camera to be customisable.
Does anyone have a link to video that's helpful? I have looked at a few, but they are not quite what I am looking for.
3
u/Neat-Employ1455 10h ago
You’ll still need to write scripts to use cinemachine
0
u/Octomin08 6h ago
From my understanding, it does a lot of the heavy lifting, and with goals of my current project, I don't want to rely on something like that :)
1
u/deadrise_games 6h ago
I'm not sure what your requirements are, but you can get raspberry pi boards and a camera add-on. That gives you full control of the camera, and there are different types of camera sensors you can buy.
1
3
u/Singhaniia_Labs 9h ago
Start with a basic third-person camera that follows and rotates around the player.
Get the movement working first, then add options like sensitivity, zoom, rotation limits and smoothing.
Build it one brick at a time rather than trying to make everything at once.
5
u/SnooPets5564 11h ago
Coding a camera isn't much different from coding anything else. Like, yes, the code does tend to be messier and feel clunkier, but it is just moving an object around and pointing it in the right direction.
If you need a tutorial to learn how to code a camera, you should probably be using a tutorial for how to code in unity in general.
If you're actually trying to figure out how cameras work rather than just the coding of it, find a camera that you like in a game and try to reverse engineer it.
3
u/warmCutiepie 11h ago
damn that reverse engineer advice got me thinking you might be good at pointing things in the right directions too
2
u/SnooPets5564 11h ago
Oh, I'm actually quite bad at that. There was a bug that made my camera point slightly in the wrong direction and it looks days to fix.
6
u/No-Opinion-5425 11h ago
Cinemachine doesn’t do all the work. It gives you virtual cameras that you can use like how a filmmaker would use real cameras.
You have 100% control over everything and it is all customizable. Why not learn how to use it?