#localplayer
1 messages · Page 1 of 1 (latest)
MLAPI
ope can't help you sorry
wait please! it has almost the same syntax I think
Could you please tell how would you do it in pun?
are you trying to check if a certain player is this client's player?
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
you're trying to make the camera follow this client's player, right?
yes, I think yes
but not the main camera
main camera is menu camera and is disabled when player spawns
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
public Transform followTransform = null;
private void Start()
{
while(followTransform = null)
{
if (GameObject.Find("Player(Clone)"))
{
followTransform =
}
}
}
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