- Home /
Question by
sethuraj · Feb 12, 2014 at 10:46 AM ·
instantiateinfiniteobstaclerunner
Please share ideas for obstacle management
Hey people I need suggestion for managing the obstacle instancing.How can I put obstacles for my infinite running game like subway surfer without giving the feeling of repeating.Like using a pattern manager or something..
please share your suggestions as comments..
Thanks.Cheers.. :-)
Comment
You can just create somethingnlike a distance:
float distance = 0.0f;
Then add to this vale each deltaTime or position along "forward" axis:
distance += Time.deltaTime;
At last in the "prefab instantiator" just set change value:
if(distance < someDistance) myPrefab = type1;
else myPrefab = type2;