Overlap Events (collision) not working unless server is watching

Hello,

showcase of the problem (gfycat link)

I have a problem with collision in a multiplayer setting (listen server). As you can see in attached gif, collision is not registering, unless the server-owned character is watching.
Setup is a bit complicated (I may try to reproduce it in a fresh project), but it comes down to:

  • Axe is a server side spawned actor, with a capsule collision child component (not root) and a delegate registered for hit detection

  • Overlap Event delegate is registered on server side only

  • Axe is attached to client character

  • Tree is a Mesh Instance at first, but it is swapped for a simple Actor (only a single mesh (root) component with a capsule collision in it) after the first hit

So far I have tried to manipulate some variables related to networking, culling and collision, on axe, tree, and character classes/blueprints, eg.: bAlwaysRelevant, AlwaysLoadOnServer, bAlwaysCreatePhysicsState, Never Distance Cull etc… Unfortunately, with no special knowlege and no similar question asked, it is a bit of a blind testing and I had no luck.

The one additional hint I have is that collision sometimes register, when the Client Character is moving during the hit animation, but it is pretty hard to reproduce.

Thanks for reading and sorry for my english - non native here :slight_smile:

I can confirm this problem. I didn’t know what was going on and then I read your post here. I went back to my project and tried to play as Listen sever and Client. When the listen server is not looking at the client when it suppose to overlap nothing happens but when the listen server is looking the overlap for the client is triggered. I can also tell you that my client can trigger the overlap but the collision box seems to be 0 and the client have to overlap vector position 0,0,0. I can also tell you that if the listen server is just looking at the actor one time then look away it is working also as intended.

It’s not the first time I have problems with overlap on the actor itself when using binding with delegate. Had a very strange behavior some months ago with another game. The collision was trigger at the wrong place when I was using it. I ended up to not use the actors overlap directly and used the collision for the components instead.

Did you find any solution yet?

Edit: I just made another test and the server can also avoid the trigger by walking backwards and looking down. it only works one time.

I also notice that as long as the overlapping client get in the viewport just a little it works after that.

Hi again, I solved my problem and I think you might have the same problem. Try this:
Your Character → Mesh → Optimization → Visibility Based Anim Tick Option
Set that to Always Tick Pose

The animation is not updating when the server is not seeing you because that saves resources. This will force the server to update the animation pose the client are using. I think it make them more in sync. It’s not 100% sync but it’s very close.

Tell me if it works!

2 Likes

Great thanks to AirBlaze. I was working on a dedicated server game and the server player never behaves as the clients. I tried a lot and luckily comes to this post. It really saved the day.

1 Like