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

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 to Arbeiters for devising a method to lerp the character smoothly in the 8 directions!


#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.