Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

prefab object collision checking doesnt work (2D)

$
0
0
so, i use this script to check collision.. i attach the script to a prefab object that will be spawned 10 times later.. void OnCollisionEnter2D(Collision2D sdd) { Destroy (sdd.gameObject); } the object already has rigidbody2d and collisionshape for 2d.. it works.. but it only destroy the orignal prefab object that i added to the scene.. not the clone of it.. anyone know how to fix this ?

Viewing all articles
Browse latest Browse all 2383

Trending Articles



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