Quantcast
Viewing all articles
Browse latest Browse all 120

last collision detection?

I'm trying to create a Pong game with 4 players. I need to make the scores, so if player01 last hit it and then touches one of the walls, player01 will get the point. But i don't know how to make it check the last player that touched the ball? This is what i tried to do: function OnCollisionEnter2D (colInfo : Collision2D) { if(colInfo.collider.tag == "Player01"){ gameObject.tag = "Player01C"; } }

Viewing all articles
Browse latest Browse all 120

Trending Articles



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