Quantcast
Channel: Questions in topic: "clone"
Viewing all articles
Browse latest Browse all 508

Unity 2D : How to make a perfect clone of my Game Object?

$
0
0
Hello I have a gameobject rock in my game scene and I cloned it and made it appear in the same position after it exits the game scene by using OnBecameInvisible but the problem I am facing is that after it re-appears it's actually a bit faster and just like that a bit more faster in the next turn and it keeps increasing. I tried using delta time but after using this the Rock doesn't even re-appears I have 2 rocks coming from both side of screen and hitting the ground and exiting the game scene, but I want my gameobject (rocks) to follow the same path and speed just like in the initial run but it changes right after they re-appears and keep changing one of the rocks even disappear after 3-4 runs(w/o delta time) Please help me with the script I am new to unity.. Thanks everyone In the picture that I attached is how the initial run goes but after that it just changes and I want it to keep following the same path, should I not clone and do prefab ? If yes please help me with prefab script so that my object pooling is just like the original one. Thanks a lot

Viewing all articles
Browse latest Browse all 508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>