unity3d - Unity: Spawn element on accurate position over time -


i wish spawn enemies moving on same speed @ specific position repeating every x milliseconds.

the problem update() function in unity occurs in non deterministic time, cannot spawn in accurate position, , delays , inaccurate positions of elements. how can solve this?

coroutines useful trigger methods periodically.

you can check this unity forum post see how works.

ienumerator spawndelay() {     spawn(); //your spawn method     yield return new waitforseconds(5);     startcoroutine("spawndelay"); //restarting coroutine after 5 sec delay } 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -