APlayerController::GetMousePosition

Retrieves the X and Y screen coordinates of the mouse cursor.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerController.h

Include

#include "GameFramework/PlayerController.h"

Source

/Engine/Source/Runtime/Engine/Private/PlayerController.cpp

Syntax

bool GetMousePosition
(
    float & LocationX,
    float & LocationY
) const

Remarks

Retrieves the X and Y screen coordinates of the mouse cursor. Returns false if there is no associated mouse device

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss