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";
}
}
↧