Hi everyone, i’m making a Derby Arena Multiplayer game where player loots weapons and destroy each others. So Cars have slots for weapons (Range or Physical) and when they overlap a weapon on the ground they attach it. For range weapons it’s working fine weapon and car don’t physically intersects each others but it’s not the same with the other type. So i would like to disable collision between my physic weapon and the owner car when i attach the weapon.
void AMeleeWeapon::Attach()
{
Mesh->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Block);
Mesh->SetCollisionEnabled(ECollisionEnabled::PhysicsOnly);
Mesh->SetNotifyRigidBodyCollision(true);
ACar* car = Cast<ACar>(GetOwner());
car->Mesh->IgnoreActorWhenMoving(this, true);
car->Mesh->MoveIgnoreActors.Add(this);
Mesh->IgnoreActorWhenMoving(car, true);
//Mesh->IgnoreComponentWhenMoving
}
i’ve tried this but it doesn’t work.
Thanks for your answers.