-1

I am using Unity3D with Photon, and I need to blur the camera of another player.

Does anyone have an idea of how can I do this?

GhostCat
  • 137,827
  • 25
  • 176
  • 248
Sebastián García
  • 103
  • 1
  • 3
  • 11
  • 2
    Welcome to StackOverflow! Can you provide some more information especially about what you searched and tried so far. Currently your question is far to broad to answer it. – derHugo Oct 09 '18 at 05:03
  • Welcome to Stack Overflow! Other users marked your question for low quality and need for improvement. I re-worded/formatted your input to make it easier to read/understand. Please review my changes to ensure they reflect your intentions. But I think your question is still not answerable. **You** should [edit] your question now, to include your own efforts (see [help me is not a question](https://meta.stackoverflow.com/questions/284236/why-is-can-someone-help-me-not-an-actual-question) ). Feel free to drop me a comment in case you have further questions or feedback for me. – GhostCat Oct 09 '18 at 08:26

1 Answers1

0

Add a PhotonView script to the camera object and a script to blur the camera object. Then create the script below and add it to the camera object Pressing the space key creates a camera blur effect for the opponent.

public class PunCamera : MonoBehaviour
{

    private void Update()
    {
        if(Input.GetKeyDown(KeyCode.Space)) 
        {
            OtherPlayerBlur();
        }
    }
    public void OtherPlayerBlur()
    {
        //Get the PhotonView in the camera object and call the RPC
        var _photonView = this.GetComponent<PhotonView>();
        _photonView.RPC("PunCameraBlur", PhotonTarget.Others);
    }

    [PunRPC]
    private void PunCameraBlur()
    {
        // Camera Blur Method Call
    }
}
JH.Noh
  • 41
  • 2
  • While this might answer the authors question, it lacks some explaining words and links to documentation. Raw code snippets are not very helpful without some phrases around it. You may also find [how to write a good answer](https://stackoverflow.com/help/how-to-answer) very helpful. Please edit your answer. – hellow Oct 16 '18 at 07:36