In my 2d game I have to make infinite platform. three types of platform will be used. When I am Instantiating platforms after some time they collide with each other. is three any other way to create infinite platform or better way. here is my code
public void SpawnPlatform ()
{
delta += Time.deltaTime;
if (delta - time > 6) {
platform.Add ((GameObject)Instantiate (platformPrefab, new Vector3 (transform.position.x * (-(i)), transform.position.y, transform.position.z), transform.rotation));
time = delta;
}