RealDocs

APawn::MoveIgnoreActorRemove

function Engine Since 4.0
#include "GameFramework/Pawn.h"
Access: public

Description

Removes an actor from the pawn's movement collision ignore list, restoring normal sweep collision between the pawn and that actor.

Caveats & Gotchas

  • If MoveIgnoreActorAdd was called multiple times for the same actor (accidentally creating duplicate entries), each call to MoveIgnoreActorRemove removes only one instance. You must call it the same number of times to fully restore collision.
  • If the ignored actor has been destroyed by the time you call this, it is safe — the function searches by pointer and simply does nothing if the actor is not found in the list.
  • Like MoveIgnoreActorAdd, this only affects movement sweep collisions on the RootComponent. Overlap and hit events between the two actors are unaffected.

Signature

ENGINE_API void MoveIgnoreActorRemove(AActor* ActorToIgnore);

Parameters

Name Type Description Default
ActorToIgnore AActor* The actor to remove from the movement collision ignore list.

Return Type

void

Example

Restore collision after a carry action ends C++
void AMyCharacter::DropObject(APickupActor* Pickup)
{
	Pickup->DetachFromActor(FDetachmentTransformRules::KeepWorldTransform);
	// Re-enable movement collision now that the object is no longer attached
	MoveIgnoreActorRemove(Pickup);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.