1

Player 1 view image

Do anyone know any method that only the player itself can see the animation but other client can't see it?

So, I'm doing stuff like gather tower(Fading dark screen and fading out)

player 2 view image

But I don't want another player see the dark panel from the another player

image

I tried a lot of method like making the observed component to None and disabled the "BlackPanelTrigger", but the animation is still Synchronizing I even tried to delete the Photon View, Photon Animator view and delete "using photon engine", but still the object is Synchronizing : (

Btw how I create the drak screen mechanic is just using a 2d collider enter then trigger animation to turn on and off the sprite visibility. Is this my code.

using System.Collections.Generic;
using UnityEngine;
//using Photon.Pun;

public class MatAnimation : MonoBehaviour
{
    [SerializeField] private Animator animator;


    private void OnTriggerEnter2D(Collider2D collider)
    {
        if (collider.CompareTag("Player"))
        {
            //Debug.Log("BlackPanelTrigger open Triggered!!!");
            //Player entered collider
            animator.SetBool("BlackPanelTrigger", true);
        }

         
    }
    private void OnTriggerExit2D(Collider2D collider)
    {
        if (collider.CompareTag("Player"))
        {
            //Debug.Log("Door close Triggered!!!");
            //Player exited collider
            animator.SetBool("BlackPanelTrigger", false);
        }
    }
}
Morris Lee
  • 11
  • 2
  • Anything tagged "Player" will cause the trigger to happen. You can trigger just on the local client by adding `if (photonView.IsMine) { animator.SetBool(... }` – hijinxbassist May 18 '22 at 16:27
  • Thank you for replying. But your solution turns out that only player A sees the screen turning dark and player B does see any dark screening animation. What I want is only the player A and B themselves can see the dark turning dark while themselves is touching the collider – Morris Lee May 19 '22 at 08:15
  • Problem occur video: https://youtu.be/Q8yn7wYIJqs – Morris Lee May 19 '22 at 08:52

0 Answers0