AActor::ReceiveActorBeginCursorOver
#include "GameFramework/Actor.h"
Access: public
Specifiers: UFUNCTIONBlueprintImplementableEvent
Description
Blueprint implementable event called when the mouse cursor moves over this actor, provided mouse-over events are enabled on the player controller.
Caveats & Gotchas
- • The C++ counterpart to override is `NotifyActorBeginCursorOver()`, not this function. `ReceiveActorBeginCursorOver` is a generated thunk for Blueprint; call `Super::NotifyActorBeginCursorOver()` in C++ overrides.
- • Requires `APlayerController::bEnableMouseOverEvents = true` — this is off by default and must be enabled in your PlayerController constructor or BeginPlay.
- • Mouse-over hit testing uses the actor's collision shape. Actors without collision or with collision disabled will never receive this event.
Signature
UFUNCTION(BlueprintImplementableEvent, meta=(DisplayName = "ActorBeginCursorOver"), Category="Mouse Input")
ENGINE_API void ReceiveActorBeginCursorOver(); Return Type
void Example
Override NotifyActorBeginCursorOver in C++ (the correct C++ hook) C++
void AMyActor::NotifyActorBeginCursorOver()
{
Super::NotifyActorBeginCursorOver();
// Highlight the actor when hovered
MeshComponent->SetRenderCustomDepth(true);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?