Collision response don`t change on mesh component

Hello i been working on this issue for a week now.
And for what ever resson when i try to turn off collision on a Destructable i have in a derived AActor::.
It don`t change and it keeps coliding with everything.

I was thinking that it may be due to the fact that its just a chunk of the the destructable mesh.
So i whent hunting for the solution in the PhysX/APEX API but was not able to find anything for turning of collision.
Turning off collision for the entier mesh whould work fine, but i stile need collision on one a other component (USphereComponent::slight_smile:

what i think should work.

DestructibleMesh->SetCollisionObjectType(ECollisionChannel::ECC_Destructible);
DestructibleMesh->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Overlap);
DestructibleMesh->SetCollisionEnabled(ECollisionEnabled::NoCollision);

Thanks for any help.

ANyone know way the component won`t change collision response?

I would like to know about this too, I’ve noticed there is no answer

A Solution

If you want to have actors not react to another actor there often needs to be a two way decision to not collide

so you need to specifically say

Destructible (my type is SpecialDestructible)

  • I ignore pawns

Character (my type is ECC_Pawn)

  • I ignore SpecialDestructibles

If you do BOTH ways it should work!

Go to

ProjectSettings->Collision and add a SpecialDestructible Object type

then check your DefaultEngine config file to see what exact channel it was set to

then in code you can set the object type to be your custom channel

I’ve done this sort of thing many times over and can verify it often does need to be a two way decision to ignore or overlap or block :slight_smile:

ps

#DefaultEngine Config

will look something like this

Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors",bCanModify=False)

but you can just use Project Settings->Collision to set it up

you might also find the change in Saved/Config/Windows/Engine.ini

Awsome i will try that soon as am off work.
Thanks :slight_smile:
Edit: Sorry for the delay am having some small problems updating my project to 4.5. I will be back soon when i have tested your sugestion.
Thanks again.

Changing collision response on a destructible at runtime is not really supported at the moment as it’s more complex than the simple rigid body case. We’re planning to add this eventually.

For now you should be able to set the collision response in the editor. The collision response will always pick the least blocking response. That is, if A and B collide and A is marked as ignoring B, it will not matter what B has selected.

whatever fixes you figure out regarding 4.5 make sure to post in my 4.5 Transitions guide in the C++ section! (once I make it)

#4.5 Transition Guide

please share what you’re learning so we all figure it out faster together!

Defenatly :slight_smile:

Hello so i got it half working now.
I Made a new Object Type and it defenetly works.
I am stile having isssues i think UBoxComponent and UCapsuleComponent changed in 4.5.

Since now if i have a box / capsule over the destructable thats set to only overlap. The mesh under never recives the Hit event so am guessing i need to mess more with the Costume Object.

PS: Am keeping this unresolved until i have it working.

Cheers!

The solution we ended up using was a work around realy, and its done with Ridgid Bodys instead of destructable mesh.
It gives us the controll we need and it looks almost the same.

I like to add that the sugestion from did work as long as it was changed before the mesh ever got hit/ (partaly destroyd). And in this case it was not exacely what we needed but thanks again and Ori Cohen.

Best Regards