Raycasts not working in multi-peer mode

RefraX295
RefraX295
edited October 2022 in Fusion

Hi,

I am unable to get raycasts to return any hits when using multi-peer mode in photon fusion. I have no issues when using single-peer mode. Am I missing something?

The raycasts are needed for clientside logic and I have tried calling the raycasts from Update, FixedUpdate, Render and FixedUpdateNetwork without luck. I have also tried the LagCompensation.Raycast functions with the same issues.

Edit: Turns out I just had to use the Runner.GetPhysicsScene() to do the raycasts, since each peer gets their own physics scene.

Comments

  • Hi,

    Yes, in multi-peer you need to use Runner.GetPhysicsScene() to refer the correct physics scene.

    -----

    Isaac Augusto

    Photon Fusion Team