Sim Callback Object - Contact Modification doesn't cancel collision response

Hi, i’m trying to cancel contact collision responses in custom SimCallbackObject, based on runtime information, but here i just disable every contact, but still objects do collide and block - is there a way that would allow me to disable blocking contacts responses on demand?

Here is a test SimCallbackObject i registered to chaos solver (at BeginPlay of some manager actor) that doesn’t seem to work:

`class FCancelContactsCallback final
: public Chaos::TSimCallbackObject<Chaos::FSimCallbackNoInput,
Chaos::FSimCallbackNoOutput,
Chaos::ESimCallbackOptions::ContactModification | Chaos::ESimCallbackOptions::RunOnFrozenGameThread>
{
public:
virtual FName GetFNameForStatId() const override
{
const static FLazyName StaticName(“FCancelContactsCallback”);
return StaticName;
}

private:
virtual void OnContactModification_Internal(Chaos::FCollisionContactModifier& Modifier) override
{
for (Chaos::FContactPairModifier& Contact : Modifier)
{
Contact.Disable();
}
}
};`

Steps to Reproduce
Register SimCallbackObject presented in post description into Chaos solver (at BeginPlay if that does make a difference?) and see that while contacts are detected, disabling them still makes bodies block collide.

ok, status update:

it’s really weird, bc disabling contacts (and generally modifying them) do work but only on general rigid bodies, like boxes, spheres - it doesn’t work for chaos vehicles and player character.

after digging into the chaos side of character movement and vehicle movement, i’ve found that they are solving collisions with traces instead of using rigid bodies, and therefore they aren’t producing any contacts.

i do wonder, if there is a way, without changing engine sources, to make any physics ray/sweep casts call something like sim callback object on hits with my custom primitive, so i could modify the distances found :thinking:

Hello [mention removed]​

Thank you for reaching out.

Would it be possible to provide a minimal project with the setup you have?

It would make it easier for me to iterate on top.

Let me know.

All the best,

[mention removed]​

Hi [mention removed]​, so in my initial post i wrongly assumed sim callback doesn’t work, but it do works pretty nice, it’s just character movement and vehicles doesn’t go the sim callback route, bc they are ray/sweep cast based, and i don’t think providing example of that would help, bc there is nothing wrong with sim callback - they just don’t use it and that’s fine.

Atm i am building a custom implicit object wrapper that overrides behavior of raycast as well as phi and normal, so i can modify query based distances reported. When i’m gonna get blocked, I’ll create a minimal example of that particular scenario and post as separate case on forum - this one is solved, it was just me not realizing character movement and vehicles goes query route rather than collider route :slight_smile:

Hello [mention removed]

Thank you for the clarification.

I’ll close this one off, then.

All the best,

[mention removed]