ShadowForgedStudio
New member
I have been running into an error that causes an impact sent over the network to fail and not damage the AI if the AI is running.
Steps to recreate in a fresh PUN demo scene:
1. Move AI's Speed Change ability to the bottom of their list of abilities
2. Set Speed Change Start Type to Automatic
3. Join scene with second player and shoot AI with second player
With these steps it is not obvious that anything is wrong but some hits will not register. To clearly see the error add a debug log at line 541 of PunCharacter.cs. (At comment // The object can't be found. Return.)
Based on this section of code it seems like the attempt to recreate the RaycastHit often fails and causes the InitializeImpactCollisionData function to return prematurely which prevents the hit from registering.
It is super important in my PvE game that all players do equal/consistent damage, so any help to figure out this issue would be greatly appreciated thanks!
Steps to recreate in a fresh PUN demo scene:
1. Move AI's Speed Change ability to the bottom of their list of abilities
2. Set Speed Change Start Type to Automatic
3. Join scene with second player and shoot AI with second player
With these steps it is not obvious that anything is wrong but some hits will not register. To clearly see the error add a debug log at line 541 of PunCharacter.cs. (At comment // The object can't be found. Return.)
Based on this section of code it seems like the attempt to recreate the RaycastHit often fails and causes the InitializeImpactCollisionData function to return prematurely which prevents the hit from registering.
It is super important in my PvE game that all players do equal/consistent damage, so any help to figure out this issue would be greatly appreciated thanks!
Last edited: