The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Raycasts not working in multi-peer mode

2022-10-30 10:36:07


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.


2022-10-31 12:41:56


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

Isaac Augusto

Photon Fusion Team

Back to top