Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

I can't run your code right now and I might be missing something, but it seems that you're not transmitting grapplePoint -variable to other clients.

You pass it as a parameter to RPC_DrawRope (see https://doc.photonengine.com/en-us/pun/current/gameplay/rpcsandraiseevent):

RPC call:

PV.RPC("RPC_DrawRope", RpcTarget.All, grapplePoint);

RPC definition:

[PunRPC]
void RPC_DrawRope(Vector3 grapplePoint) { 
    this.grapplePoint = grapplePoint; 
    ...
}

There are better ways, though. Consider using OnPhotonSerializeView -method for synchronizing variables (https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/pun-basics-tutorial/player-networking).