Does AnimMontage play on a dedicated server for the purpose of collisions?
A friend and I have spent days trying to figure out this issue. Here is what we have: A player character with a collision sphere snapped to the hand_l bone. As the player punches with an AnimMontage we want the sphere collider to fire an overlap event with other characters in a multiplayer environment. I am using RPC calls to generate the events up to the server and var notifies to replicate them back to other clients. The animations are correctly playing on all clients and I can see the sphere colliders moving with the punches.
When I run the game using 2 players and dedicated server unchecked it works fine and fires the overlap event correctly. I can punch on either the client or the client+server and it generates the correct overlap events. However, as soon as I check the dedicated server option, the overlap events no longer fire. I can step through the blueprints and watch the server side playing the AnimMontage, but yet the overlap event still does not fire. I also found that the overlap events do fire if overlapped in their original location (with the left hand at the side of the player). So I can only assume one of two things is happening.
Either the AnimMontage is not moving the skeleton on the dedicated server (maybe this is optimized out?) or the sphere collider is not moving with the mesh on the dedicated server.
If I am willing to have the collision be executed on the clients, this setup also works fine, but I need the server to be authoritative when it comes to attack collisions.
Any ideas??? Is there a way to have the dedicated server be a third window and show what is happening on the dedicated server?
*For anyone trying to replicate this, there is an issue with the root capsule component of the character never firing overlap events. I have seen Epic staff elude to the fact that the root component collider is special somehow, so I got the overlap working by creating an exact copy of the capsule collider. Then the overlap events fired correctly (just not with dedicated server option checked).
asked May 30 '14 at 02:39 AM in Blueprint Scripting
I finally figured it out!!! So I narrowed it down to the fact that the skeletal mesh was not animating on the dedicated server. I did this by creating a socket and printing the sockets transform location to the screen. With dedicated server turned off, it moved. With dedicated server turned on, the socket never changed location. So then I decided I would try changing every single setting on the skeletal mesh until it worked. Finally when I set "Mesh Component Update Flag" to "Always Tick Pose and Refresh Bones" it instantly worked perfectly and all of my collision events fired as expected!
answered May 31 '14 at 04:17 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here