Ideas for Melee Combat w/ Netcode for Entities?
I'm working on a squad combat game based on the Competitive Action Multiplayer Template, and I'm a bit stuck on how to turn player input into interesting tactical combat that feels responsive but not arcade-y. If you've got any ideas that have worked in the past, or any links to resources/examples I would really appreciate it.
What I've got now (the jank):
- Weapons and shields are rigidbodies mounted to the player with joints
- I animate the weapon from its initial pose to a target position using a simple animation curve
- A "hit" occurs when the weapon tip (trigger) hits another rigid body, and the weapon retracts from that point
- The player can hold right click to aim, which also changes the angle of their attack (high/low and left/right)
It's pretty cumbersome right now, and the physics components don't seem to be playing well with the Netcode. It's either stuttering if I make the weapon ghosts player-owned or rubber banding if I make them server owned.
Any thoughts on DOTS/ECS-friendly solutions? My initial thought (before this) was to look at a hybrid solution for attack animations, but I've had some performance troubles in the past. I'm much more of a systems programmer, and boy is this a different challenge.
Here's a video of the setup now:
Posted Aug 8, 2025, 9:03 PM UTC