Question by
MORIBOND · Jul 06, 2020 at 07:01 PM ·
instantiatetriggertimeacceleration
How To Instantiate On Acceleration
Hello everybody,
I try to clone squares and keep distance between them but i don't success. So i move the blue squares with a mouse drag and i clone them with this code:
//public void OnTriggerEnter2D(Collider2D collider) {
var instantiatedClone = Instantiate(collider.gameObject, PortalSpawnPoint.position, Quaternion.identity, collider.transform);
instantiatedClone.gameObject.GetComponent<Move>().enabled = false;
}
More explications:
I guess i have to introduce time on my code but i don't know how, can you help me?
Thank you in advance.
capture-decran-2020-07-06-a-205004.png
(51.8 kB)
Comment