Skip to content

Instantly share code, notes, and snippets.

Jellybit

Block or report user

Report or block Jellybit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Jellybit
Jellybit / CameraControl.cs
Last active Jun 5, 2020
Super Metroid style camera for Unity3D.
View CameraControl.cs
using UnityEngine;
using System.Collections;
// This is basically how the Super Metroid camera worked. Whichever direction you moved, the camera would
// move in the same direction a multiple of the player's speed. Once the center of the camera moved a
// certain distance from the player, the camera would lock on the player and move the same speed. Change
// movement direction, and the camera would once again move more quickly to catch up and place itself
// ahead of the player's movement.
// Super Metroid also had area limits and locked certain axes based on where you were. For instance, if
You can’t perform that action at this time.