I’m making a semi rts game and the units will sometimes get stuck on each other when trying to get through gaps like this (they’re really working together for this blockage)
the units are just USphereComponents where I’ve stopped rotation and given them all no friction like this. I would have thought removing friction would have solved this kind of issue though.
SphereComponent->GetBodyInstance()->bLockZTranslation = true; SphereComponent->GetBodyInstance()->bLockXRotation = true; SphereComponent->GetBodyInstance()->bLockYRotation = true; SphereComponent->GetBodyInstance()->bLockZRotation = true; SphereComponent->SetLinearDamping(0.5f); UPhysicalMaterial* PhysMat = NewObject<UPhysicalMaterial>(this); PhysMat->Friction = 0; SphereComponent->SetPhysMaterialOverride(PhysMat); SphereComponent->SetCollisionEnabled(ECollisionEnabled::PhysicsOnly); SphereComponent->SetCollisionResponseToAllChannels(ECR_Block); SphereComponent->SetSimulatePhysics(true);
I cant work out how other RTS games manage to prevent units getting blocked like this. does anyone have any ideas?