Working in Blueprints with a Character blueprint, I’m having difficulty updating the location of the Mesh(CharacterMesh)(Inherited) component.
I’m trying to implement ducking functionality and my flow looks like this: button press → “update” locally → call server → server calls all clients → every client except the one that owns the character “updates” their version of the character. The “update” consists of doing the following things: modifying the size of the CapsuleComponent by setting the CapsuleHalfHeight, modifying the location of the mesh (which is a child component of the CapsuleComponent), and modifying the position of the camera (which is a child component of the mesh). When running in PIE with 2 clients and a “dedicated server,” I’m able to see the CapsuleComponent shrink when the other player ducks. The camera also correctly changes location; however, the mesh does not.
I think in reality the mesh actually does change location, but then as gravity causes the character to fall, it reverts back to it’s default location. I sort of confirmed this by adding some additional functionality at the end of the multicast call from the server. I put in a 2s delay and then, once again, ran the “update” to update the size of the capsule, the location of the mesh, and the location of the camera. When doing this, I observe (through the other client’s PIE) that the location is correctly set after the 2s delay; however, if the character moves in the slightest, the location of the mesh instantly reverts back to it’s default location.
What’s going on here? Is there something with Actor ownership that I don’t understand? Thanks in advance.