#localplayer

1 messages · Page 1 of 1 (latest)

verbal swan
#

Is this with PUN?

midnight oxide
#

MLAPI

verbal swan
#

ope can't help you sorry

midnight oxide
#

wait please! it has almost the same syntax I think

#

Could you please tell how would you do it in pun?

verbal swan
#

are you trying to check if a certain player is this client's player?

midnight oxide
#

Ok, so... I need the camera clone follow the player clone

#

but it needs to choose the right player, that's why I'm trying to find the one that is localplayer

#

in a while

verbal swan
#

you're trying to make the camera follow this client's player, right?

midnight oxide
#

yes, I think yes

#

but not the main camera

#

main camera is menu camera and is disabled when player spawns

verbal swan
#

well that depends entirely on how players are created. If they're instantiated by PUN then they would have an 'owner' variable in the PhotonView. Idk if that translates to MLAPI

midnight oxide
#
public Transform followTransform = null;

    private void Start()
    {
        while(followTransform = null)
        {
            if (GameObject.Find("Player(Clone)"))
                
            {
                followTransform = 
            }
        }
    }

verbal swan
#

You need to have some way to map the player objects in the scene to their owners. And one would be mapped to the local client. That should be done when they are created