Skip to content

Simple 3rd person controller demonstrating camera-relative movement and the new Cinemachine 3rd Person Follow / Aim system

License

Notifications You must be signed in to change notification settings

PixelWizards/ThirdPersonController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTA Style 3rd Person Controller / Camera Example

Simple 3rd person controller example for Unity demonstrating camera-relative movement, root motion animation and the new Cinemachine 3rd Person Follow / Aim system

ThirdPersonController

Full video

https://www.youtube.com/watch?v=e9YOstnzfKY

There are 2 core scripts:

CharController.cs

This is the main character controller. Using a super simple 1D linear animation controller and root motion for the character movement, this script provides camera-relative movement and animation for a character (similar to GTA).

CharacterController

The Animation Controller is very simple and only requires 2 animations, Idle & Walk.

This may get extended to add more animations (run etc), but I wanted to keep it as simple as possible.

ThirdPersonCameraController.cs

This script wraps the new 3rd person follow camera extension that ships with Cinemachine 2.6.x and higher.

Supports toggling which side the camera is on (ala Ghost Recon Wildlands) and also exposes inverting for vertical and horizontal camera rotations.

CameraController

Usage, etc

Main branch updated to use 2020.3

You can find 2019.4 versions in the branch /versions/2019.4

This repo uses Git LFS.

Licensed under the MIT License

About

Simple 3rd person controller demonstrating camera-relative movement and the new Cinemachine 3rd Person Follow / Aim system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published