Created
December 6, 2013 16:01
-
-
Save v21/7827173 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vector3 parallaxCenter = background.parallaxCenter.position; | |
Vector3 mainOffset = mainCamera.position - parallaxCenter; | |
cam1.position = parallaxCenter + Vector3.Scale(mainOffset, cam1Factor); | |
(Scale is component-wise multiplication) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment