How to handle collisions?

Options
I am just trying to learn some photon but i am pretty lost in collision phase i tryed all kinda stupid and not so stupid stuff broblem is in my collision.

so there is parts of my script where i have some problem i use unity.

so i shoot with this.
GetComponent().RPC("Shooting", PhotonTargets.All);

[PunRPC]
void Shooting()
{
Rigidbody bullet;
bullet= Instantiate(projectile, transform.position, transform.rotation) as Rigidbody;
}

then in my bullet prefab i have simple scipt to move my bullet problem is bullet hits me and makes all kinda wierd things.

void OnCollisionEnter (Collision collision)
{
//in here i have tryed all kinda things but i am not sure how to implement this right.
}

i think i need some kinda tag check but when i instantiate second player to server wich is copy of same prefab it is not going to work.


Comments

  • zak
    Options
    Oh yea and sort of an edit, game is just pretty simple 2d game where planes fly and try to shoot spheres to another.
  • vadim
    Options
    Hi,

    This does not look like network related.
    Maybe disable collision between bullet and shooting player?