We need 3D swimming for a multiplayer game. CMC has a Swimming movement mode and handles networked movement pretty well, so we’d like to use that.
We also need a large amount and variety of attractive water bodies that are easy to edit. The Water plugin’s water can look great and is super easy to shape using splines on terrain layers, so we’d like to use that.
Problem: CMC swimming does not naturally work with Water plugin’s WaterBody actors. CMC Swimming movement mode requires the Character to overlap a PhysicsVolume that has its bWaterVolume flag enabled. PhysicsVolumes are Brushes placed and shaped manually in the editor.
There doesn’t appear to be a way to treat WaterBody actors as PhysicsVolumes. There doesn’t appear to be a way to automatically adjust PhysicsVolumes to match changes made to WaterBody splines. I’ve even tried spawning a PhysicsVolume on each Character at runtime and toggling its bWaterVolume flag when the Character enters or leaves a WaterBody actor, but being a Brush there doesn’t appear to be a natural way to spawn a usable PhysicsVolume (as the game is large-scale multiplayer, Characters can’t be baked into the map, so we can’t attach a PhysicsVolume actor to them; and the ChildActorComponent spawns PhysicsVolume actors that don’t seem to trigger overlap events).
We’d really like to avoid altering the engine directly. At this point we’re looking at subclassing CharacterMovementComponent, copying in most/all of the swim code into overrides, and refactoring it enough to expose hooks for the swim movement that can be used to control it without a PhysicsVolume. Is there a simpler/better solution we’re not thinking of?