Invalid worldAABB. Object is too large or too far away from the origin.
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Invalid worldAABB. Object is too large or too far away from the origin.
L3sc
2020-09-04 13:12:38
Hi guys,
As I see this error mostly happening when I disconnect photon and after connect.(Not reconnect/reconnectandrejoin)
When the game start kind of RPC's and serialize view not working. Client object spawning middle of the screen (0,0,0) but must be something like (5,0,0). Title error logging on master when client data received for sync.
1)Is it about PhotonNetwork.automaticallySyncScene or my disconnection setup?
2)Do I need to wait OnDisconnectedFromPhoton callback?
Btw this is my disconnect function:
PhotonNetwork.NetworkingClient.LoadBalancingPeer.OpLeaveLobby();
PhotonNetwork.NetworkingClient.LoadBalancingPeer.OpLeaveRoom(false);
PhotonNetwork.Disconnect();
SceneManager.LoadScene("Main");
Thanks in advance.
Comments
I debugged player receiving position in OnPhotonSerializeview and player position y not sending correctly. This is happening really low chance but how it's possible? All other photon related things working such as rpc.
This is one of received value: -6.072495E-29
void Update()
{
if (photonView.IsMine)
return;
SyncOtherPlayerPos();
}
public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.IsWriting)
{
stream.SendNext(transform.position.y);
}
else if (stream.IsReading)
{
currentTime = 0.0f;
lastPacketTime = currentPacketTime;
currentPacketTime = info.SentServerTime;
positionYAtLastPacket = transform.position.y;
paddleY = (float)stream.ReceiveNext();
Debug.Log(paddleY);
}
}
void SyncOtherPlayerPos()
{
double timeToReachGoal = currentPacketTime - lastPacketTime;
currentTime += Time.deltaTime;
transform.position = Vector2.Lerp(new Vector2(transform.position.x, positionYAtLastPacket), new Vector2(transform.position.x, paddleY), (float)(currentTime / timeToReachGoal));
}
Other paddle coming middle of the screen. This mean x value = 0. But this value just assigning on player created as locally.
PhotonNetwork.Instantiate("Player", new Vector3(spX, 0f, 0f), Quaternion.identity);
When this happened game timer rarely printing infinity.
float timer = (float)(PhotonNetwork.Time - startTime);
float passedTime = totalTime - timer; //infinity
Which part am I missing?
shinichikudo997
2021-10-06 17:21:58
I am facing this issue, but in my case rpc are not working but transform is. Any help?
Back to top