Skip to content

Dead simple Unity orthographic camera follow script for platformers and top down games

License

Notifications You must be signed in to change notification settings

repl-games/Unity-2D-OrthographicCameraFollow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Unity 2D Orthographic Camera Follow Script

This is a dead simple 2D camera follow script that can be used for top down or side scrolling games. The script can be attached to your Main camera. Then, you'll want to create a GameObject hierarchy in the Unity editor that looks like:

ParentGameObject
├── PlayerObjectThatMoves
├── Main Camera
├── ....other GameObjects ...

You'll then want to set targetTransform in the Unity editor to your object that moves in this hiearchy. You can tweak followSpeed in the editor to adjust how fast the camera follows the target.

About

Dead simple Unity orthographic camera follow script for platformers and top down games

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages