Created
May 7, 2014 07:34
-
-
Save Narven/cdff1f2d556c51e51d40 to your computer and use it in GitHub Desktop.
Unity3d javascript scrolling texture
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
var scrollSpeed = 0.90; | |
var scrollSpeed2 = 0.90; | |
function FixedUpdate() | |
{ | |
var offset = Time.time * scrollSpeed; | |
var offset2 = Time.time * scrollSpeed2; | |
renderer.material.mainTextureOffset = Vector2 (offset2,-offset); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment