Unity Scale objects via script?
DIRECT DOWNLOAD HERE
THIS IS BACKUP IN TEXT FORM
1. Create New java and name it : how you like
2. Copy & Past this text and save java :
---------------------------------------------------------------------------------
#pragma strict
var maxSize = 2.0;
var minSize = 0.2;
var speed = 1.0;
function Update () {
var range = maxSize - minSize;
transform.localScale.y = (Mathf.Sin(Time.time * speed) + 1.0) / 2.0 * range + minSize;
}
---------------------------------------------------------------------------------
0 comments:
Post a Comment