AActor::SpawnCollisionHandlingMethod
#include "GameFramework/Actor.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
Controls how spawning this actor is handled when it would collide with an existing object. Applies when the actor is spawned via UWorld::SpawnActor and an explicit CollisionHandlingOverride is not provided.
Caveats & Gotchas
- • This property value is used only when no override is passed to SpawnActor. If SpawnActorDeferred is used or if ESpawnActorCollisionHandlingMethod is supplied explicitly at the call site, this property is ignored.
- • The default engine value for new actors is Undefined, which resolves to AlwaysSpawn — actors will be placed even if they overlap geometry. Set to AdjustIfPossibleButAlwaysSpawn or DontSpawnIfColliding for physics-relevant spawns.
- • Does not affect bAlwaysRelevant or collision during gameplay — only impacts the initial spawn placement decision.
Signature
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Actor)
ESpawnActorCollisionHandlingMethod SpawnCollisionHandlingMethod Example
Set spawn collision method in constructor C++
AMyProjectile::AMyProjectile()
{
SpawnCollisionHandlingMethod = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
} Tags
Version History
Introduced in: 4.9
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?