AActor::SetActorEnableCollision
#include "GameFramework/Actor.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Enables or disables collision for the entire actor by toggling all of its collision components at once.
Signature
void SetActorEnableCollision(bool bNewActorEnableCollision) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bNewActorEnableCollision | bool | Whether to enable collision for all components on this actor. | — |
Return Type
void Caveats & Gotchas
- • This is an actor-level override — it does not change the collision profile of individual components. When re-enabled, components restore their original profiles.
- • Overlap events and hit events will not fire while collision is disabled.
- • Does not affect the CharacterMovementComponent's internal collision queries — a Character with disabled collision can still have movement blocked by geometry in some edge cases.
Example
Temporarily disable collision C++
// Disable during a cinematic, re-enable after
SetActorEnableCollision(false);
// ... later ...
SetActorEnableCollision(true); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?