photonView.isMine not working with right joystick (firing) in twin stick shooter for mobile.

Options
Hi all,

Making a twin stick shooter for mobile. Left joy for movement works well as does right joy for rotation. The right joy also fires. My issue is that the right joy fires and rotates for all players in the room. I have used the 'photonView.isMine' to isolate movement control effectively but the rotation and firing still happens across all players.

I am using Playmaker for the firing and using the code below:

if(photonView.isMine){
myBullets.SetActive(true);
GetComponentInChildren ().enabled = true;

}
else{
myBullets.SetActive(false);
GetComponentInChildren ().enabled = false;



myBullet is the bullet prefab (in \resources). See:

Thank you.

Comments

  • OBA_Games
    Options
    Weird my image link was deleted?

    http://imgur.com/a/hGZBV

  • Tobias
    Options
    I'm sorry you got no reaction. We have almost no experience with PlayMaker.
    Did you find an explanation and solution?
    My guess: If all scripts running get the "fire" event from Unity/PlayMaker, some script will be on a object that belongs to you and will shoot. Maybe you need to have one script that handles firing input and then places new bullets where you need them, under your control?