Repeat geometry over and over

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 :slight_smile:

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;
    }


Could it be that the rotation doesn’t match between the two?

Hi FlamingHairball,

It’s now rotated by script I also tried a animation done by maya the same result.

Btw, there are two prefabs with that script in the scene. It starts oke but when the first goes back to the top it;s out of sync.

Roy

If it doesn’t work in Maya, then it sounds like your model doesn’t loop seamlessly.

sorry i meant in maya is everthing okay but not in unity. same result with keyframe animation from maya to unity.

Ah, ok. Could you upload a copy of the mesh for testing?

Sure, :slight_smile:

840542–31331–$Screw_01.rar (13.6 KB)

Don’t have Maya sorry - .FBX or .obj maybe?

Fbx version,

840551–31332–$Screw_fbx.rar (16.7 KB)

Hey,

I’m not seeing an issue on my system - if you’d like to send over a test scene I’d be happy to take a look.

Regards,

-Lincoln Green

Hi FlamingHairball,

I started a new clean project and now it works :smile: wierd.

Thank you for you time!

Roy