I´m currently working on the Multiplayer part for a 2D top-down game. I´m using Photon Pun2, to do this. My problem is, that always just the last player, who joined the game get´s my camera follow script attached. I´ve tried setting an

if (!myPV.IsMine)

on top of the function, but it doesn´t seem to work. I give you the script here, so it would be nice, if you tell me, where I have to do what, to get 2 (and more) different views of the camera

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraFollow : MonoBehaviour
    public Transform followTransform;

    // Update is called once per frame
    void FixedUpdate()
        this.transform.position = new Vector3(followTransform.position.x, followTransform.position.y, this.transform.position.z);


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.