Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

Collision Detection Problems

$
0
0
Hello fellow developers. My game consists of a base building mechanic i am trying to code however is proving difficult to do. I wish to 'snap' the foundations together through the use of collisions. I have done this by making a 'Snap Block' which has a collider on it. When i instantiate the new foundation i have it check it's collision tag through the use of: OnCollisionEnter (col : Collision) { if (col.gameObject.tag == "SnapObject") { //Some code to teleport the foundation to the snap block and freeze its position.. (it works ive tested it) } } This works perfectly fine until i child the 'Snap Block' to the foundation. Can anyone tell me why this happening and possibly how i could fix it?

Viewing all articles
Browse latest Browse all 302

Trending Articles



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