Third Person Camera Script


#1

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
@Crhythm - Providing an idea crucial to camera collisions


#3

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.


#4

Done!


#5

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


#6

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.


#7

Currently working on that.


#8

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


#9

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


#10

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?


#11

Hmm, will look into it


#12

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.


#13

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


#14

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


#15

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


#16

Fixed a bug with the popper system!


#17

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


#18

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


#19

@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