Hi All,
I have a issue that i’m unable to solve. I have made a screw/turbine that is drilling down the model is 10 units high and is perfecly stackable in maya and unity.
Now I have a script that is checking when the screw is -10 units reset it to 10 so that the screw/turbines keep stacking, repeating and drilling down.
The problem is that there is a gap between them.
Is it my script or do I have to do this in a different approach?
Any help appreciated
Roy
Turbine.js
#pragma strict
public var twister : Transform;
var turbineEnd = -10.0;
var speed = -1.0;
var twist = 108;
function Update() {
transform.position.y += Time.deltaTime * speed;
transform.Rotate(0, Time.deltaTime * twist, 0);
if (transform.position.y <= turbineEnd)
transform.position.y = 10;
}