Photon Bolt - Instantiating Object at Event Position/Rotation off

Hello Everybody,
I've got somewhat of a problem with transforms and Bolt Events. What I am doing is I am sending Position and Rotation info together with an IProtocolToken as a Global Event and instantiate a GameObject at said Transform. The problem is that it doesn't come out in the right position. It is always offset a bit. What is especially strange is, that it works, when I create a new Component on my Instantiated GameObject with the position and rotation as fields and set the transform one frame later from there.

Can anyone see what might be the problem here? I also tried sending the transform as part of the IProtocolToken and as a 4x4 Matrix. None of it works. When I check the values along the way in a log, all is fine, but as soon as the part is instantiated it is off quite a bit.

Would be wonderful if someone had an idea, of what's going wrong there.

Thanks in advance.

Comments

  • @jpdrude ,

    Are using any compression settings in the Event properties?

    Can you share a project showing the issue?

    --
    Ramon Melo
    Photon Bolt Team
  • I am not using any compression. Also, I can't really share the project, I think that would just be too big and I don't know how I can recreate the issue in a smaller project. Could it have to do with order of execution or any race conditions? Something seems to be changed after the instantiation from the Bolt event, or the data isn't fully present.

    I now created a workaround by using a buffer, which will perform all changes at the next MonoBehaviour Update call. I think that is a workable solution for me that's elegant enough.

    Thanks for the reply in any case!
  • Hi @jpdrude ,
    Could it have to do with order of execution or any race conditions?

    I doubt it has something related to this.
    Something seems to be changed after the instantiation from the Bolt event, or the data isn't fully present.

    Bolt will only modify your values if there is some compression enabled.
    When I check the values along the way in a log, all is fine, but as soon as the part is instantiated it is off quite a bit.

    So, for example, you set a Vector3 param of the event, and when sending it, you log the values, they are shown as expected.
    When this event arrives at the other end, the Vector3 param has different values?
    Or, the values are the same, but when spawning your "part", and using the Vector3 the place it, it appears in a different location from the expected?

    --
    Ramon Melo
    Photon Bolt Team