Hi!
I was trying to make a modular transport, that uses one blueprint class as a pawn base class with physics root, and some attached actors in it (like bumpers or doors). But I found a bug with collision.
When I attach an actor to a physics component, root’s collision works as expected, but all other components, that are child to root just have no collision.
Here is a screenshot:
To reproduce:
- Create blueprint with physics component as a root or just a regular static mesh with physics on a scene.
- Create a blueprint with root mesh component and another mesh component attached to root. Make sure every component has BlockAll collision preset and do not mess with eachother.
- Then use AttachToComponent function to attach your blueprint to a physics actor (at BeginPlay, for example).
- Root component will have proper collision, but other component will ignore physics at all, just on screenshot.
- Spawn same actor with root’s physics enabled, and other component will work fine.
So AttachToComponent breaks physics on components, that are attached to an attached component.