Movement for character with complex collision shape
Project example for UE 5.3.2
When you need to have a character with complex collision shape like a vehicle or a space ship or something similar - you will have character capsule size be too much bigger than needed. This will come to some restriction in movement of the character – character will not be able to come close to objects, move in narrow places and etc.
The next solution is not a complete solution but just a one of the ways and example and can be used as entry point you can start from. It was used for flying objects mainly, but it also support other physics modes but I think other additional code changes will be required additionally.
How to setup:
Character MC should have one of the following settings enabled: bOrientRotationToMovement or bUseControllerDesiredRotation
Change root collision size:
• For flying physics you can drop root capsule size to unit and disable root capsule collision at all.
• For walking physics root capsule size should be based on main walkable mesh
You add MultiCollisionCapsuleComponent to cover the mesh shape and you build with this additional components complex shape of the character.
How it works:
Optimization:
This system can be used with modular characters with some changes.