Hey All,
We have a game currently setup using photon unity network. We are trying to add forces to objects over the network, however the force being sent over the network(RPC) is not being applied to the player. Could someone please help us identify the problem?
We are synchronizing the player rotation and position using photon view.
[RPC]
void ApplyGrappleForce(Vector3 force)
{
if(photonView.isMine)
{
Debug.Log("SelfCall Grapple force" + force);
armCollision.rigidbody.AddForce(force, ForceMode.Acceleration);
PhotonView pv = armCollision.GetComponent<PhotonView>();
photonView.RPC("ApplyGrappleForce", PhotonPlayer.Find(pv.owner.ID), force);
}
else
{
Debug.Log("NetworkCall Grapple force" + force);
photonView.rigidbody.AddForce(-force, ForceMode.Acceleration);
// rigidbody.AddForce(force, ForceMode.Acceleration);
}
}