Third Person Camera Script

Alright guys, so after a ton of waiting for a response on my previous post about my broken camera, I decided to make a third person camera from scratch. I feel this may be of aid for folks, so here ya go!

Orbital Script
Source Code

What does it allow for?
-Manages to rotate the camera with just the movement of the mouse
-Manages to move around the character, and not a static focus point
-Basic 8-Directional movement
-Easy to modify
-Camera collisions (Can be toggled)

To use, just insert in the StarterGui

Hopefully you’ll find this of use!
Any constructive criticism is appreciated, and please do alert me of any bugs!
Credits:
@Arbeiters - Devising a method for a smooth 8-directional body lerp
@BanTech - Providing a function crucial to camera collisions
@Chrythm - Providing an idea crucial to camera collisions

104 Likes

Are you able to upload this to paste bin? At school for a few more hours, and I’d really like to look at the source.

2 Likes

Done!

Is there a way to retain the PopperCam? - Basically zooms in when a part is between the player and the camera.

It’d be nice to have some sort of initialisation where you can set whether popper cam / cutoff is enabled or not. GetLargestCutoffDistance may be of use.

Currently working on that.

Updated the model! PopperCam has been added and can be enabled/disabled at initialization!

3 Likes

Awesome! Mahalo! :call_me_hand:t4::blush:

1 Like

It seems to lock onto bricks when you look directly at baseparts in front of the character. :confused:

Fiddling around with the code to see if I can get it to not flash. Any ideas?

Hmm, will look into it

1 Like

When I had that problem making a camera script, it was because I was checking for what’s between the camera’s position and the player. The way you should be doing it (if you aren’t already) is by checking for what’s between where the camera should be and the player.

Updated the script! I managed to stop it from looking at baseparts or over-pushing when staring at a basepart from above the character!

Credits to @Crhythm for giving me the idea on how to tackle it

2 Likes

Thank you for this
Also, I recall seeing a demo of this in video form, anyone know where it is?

No problem, my man
Never heard of a video demo of this though

1 Like

Fixed a bug with the popper system!

1 Like

I’ve been working on my own over the shoulder (OTS) system (I’ll drop a link below), and it got me thinking, as someone who is really bad at CFrames, it brings a lot of ideas together nicely and really helps you both 1. Visualise it, 2. give you something you can play and experiment with.

I think you should consider writing a step by step tutorial to actually make a working OTS camera, with diagrams explaining what each stage do, and if alternatively, you were to fiddle with this number instead of that number, what cool stuff might happen. I would be happy to help proof read and structure!

I would write it myself, but I would feel like it would be the blind leading the blind - or worse the blind pepper spraying the sighted!

My camera system

Spawn in and press C
https://www.roblox.com/games/1359552499/WILD-WEST-PROJECT

3 Likes

You can overwrite the CameraScript, just name it CameraScript in StarterPlayerScripts and the default camera will not be loaded.

@DeepBlueNoSpace
Actually, I am currently working on tutorials, lol
I’ll do one on explaining OTS camera creation very soon
Also, I can’t access your system since my group spaces are full, so rip

@DevChris
Thanks! Will take that into account the next time I edit this

2 Likes

I don’t know if this still works, but…

2 Likes

Most definitely busted at that part - I’ll fix it in a while
Thanks for mentioning!

6 Likes