Skip to content

Simple script to change the cameras size depending on the velocity of the target

License

Notifications You must be signed in to change notification settings

tonisuo/CameraSizeToVelocity2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity-CameraSizeToVelocity2D

Example

example

Description

Use this simple script to tie your camera size to the target RigidBodys velocity. In a 2D side-scrolling game this can be used to show you more of the game area when the player is moving faster.

Usage

Assign a RigidBody2D component to the target variable, the script uses this objects velocity to determine the size of the camera.

Assign a minimun and maximum values to the mincam and maxcam variables to control the overall size of the camera.

About

Simple script to change the cameras size depending on the velocity of the target

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages