Third Person Camera [light weight]

Hi all,

in the last days I wrote some cam scripts for an drone game I working on and I feel glad to present some light weight mouse cam script with some features:

cap:
cap the camera angle in between the camera should stand*

shift:
if the players orientation go to tilt at the side axis (X) the camera decentralized to let you see more of the tilted screen

collision:
the camera will zoom in or out if some object in the way to the player or only by hitting the ground or object

jiggle:
first you have to enable it in the collision function you can see some commented lines uncomment this lines (66, 73-75, 87-89) maybe I should look for an better solution but for now you have to deal with this, and also you have to give the property “jiggle” an value (maybe 0.012? or 0.5 for earthquake) try this by your self :slight_smile:

also some features:

It don’t need the current player name it takes the name from the parent of “cameraTarget” but you can change it by your self too.

It has no effect at the player directly except the rotation at Z axis (local) no movement this can be written in some extra scripts that extends the modularity and splits the camera from the player.

mouse smoothing by adjustable.

It don’t use as many properties as some of the other cam-scripts I have seen. For large projects perfekt to keep the overview over the properties of the camera/mainPlayer

if you do not need some of the features let me know I am interested to read what you think about it

  • I think I messed some things in the cap section a little bit up so there is a bug that the cap is drifting around.
    will fix it some days later

3rdPersonCam_CanniProven.blend (951 KB)

ps: I know cars shouldn’t move like this in the demo but I was thinking a little model would be better than a simple cube

pps: as always the exit key is “Enter”/“Return” in startup I like this more when I programming some in Game menus that’s keybinding is at “ESC”