Hi,
I have a bodysetup which has multiple shape elements and I’m trying to enable/disable collisions on them individually as well as override some channel responses. I found some convenient functions on the bodyinstance which seem to fill this role.
FBodyInstance::SetShapeCollisionEnabled
FBodyInstance::SetShapeResponseToChannels
When I try to use them however their behaviors are inconsistent. SetShapeResponseToChannels doesn’t seem to work at all while SetShapeCollisionEnabled only seems to function with specific types of queries. For my case it only works for ComponentOverlapMulti but not for ComponentSweepMulti.
Additionally for SetShapeCollisionEnabled to work for ComponentOverlapMulti it requires me to provide a FCollisionEnabledMask when passing FComponentQueryParams it. This isn’t so much an issue for new code but for already existing code like UPrimitiveComponent::MoveComponentImpl I don’t really have a way to provide the mask. Normally there exists UPrimitiveComponent::InitSweepCollisionParams which lets me override the query params but unfortunately it only takes in FCollisionQueryParams and not FComponentQueryParams which is the class that has the mask.
Are these functions still supported? Is there a better way to have this kind of behavior? Are there alternatives like calling functions from Chaos or the physics interface directly that could give me the desired behavior?
Let me know if you need more info!
Simon