MGameplayStatics
- Module
- Game
- Header
#include "Game/MGameplayStatics.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Public functions
| Returns | Name | Description |
|---|---|---|
float | GetWorldDeltaSeconds | |
float | GetTimeSeconds | |
float | GetRealTimeSeconds | |
void | SetGamePaused | |
bool | IsGamePaused | |
void | SetGlobalTimeDilation | |
float | GetGlobalTimeDilation | |
AActor* | SpawnActorByClass | |
void | DestroyActor | |
Vec3 | GetActorLocation | |
void | SetActorLocation | |
Vec3 | GetActorRotationEuler | |
void | SetActorRotationEuler | |
AActor* | GetPlayerPawn | |
MGameInstance* | GetGameInstance | |
float | ApplyDamage | |
bool | IsActorDead | |
float | GetDistance | |
bool | LineTraceByChannel | The reflected two-arg form traces Visibility (Visual Script nodes and existing graphs call it with exactly two inputs — the VM's arity check is strict, so the channel rides an unreflected overload instead of a third param). |
bool | LineTraceByChannel | |
Vec3 | GetLastHitLocation | |
AActor* | GetLastHitActor | |
Vec3 | GetLastHitNormal | |
float | GetLastHitDistance | |
bool | SphereTraceByChannel | Sweep and overlap verbs over the same channel filtering. |
bool | SphereTraceByChannel | |
int32_t | LineTraceMultiByChannel | Every body the trace passed through, in order, ending with the one that blocked it. |
int32_t | LineTraceMultiByChannel | |
int32_t | SphereTraceMultiByChannel | |
int32_t | SphereTraceMultiByChannel | |
bool | CapsuleTraceByChannel | An upright capsule — the shape of a character — swept from start to end: "would a pawn fit through here" rather than "would a ball". |
bool | CapsuleTraceByChannel | |
int32_t | CapsuleTraceMultiByChannel | |
int32_t | CapsuleTraceMultiByChannel | |
int32_t | OverlapSphereActors | Narrow-phase overlap: a body counts only when its actual shape is inside the volume, not merely its bounding box. |
int32_t | OverlapSphereActors | |
int32_t | OverlapBoxActors | |
int32_t | OverlapBoxActors | |
int32_t | OverlapCapsuleActors | |
int32_t | OverlapCapsuleActors | |
bool | LineTraceAny | Existence tests that stop at the first body that qualifies, and a point probe. |
bool | LineTraceAny | |
bool | SphereTraceAny | |
bool | SphereTraceAny | |
bool | AnyOverlapSphere | |
bool | AnyOverlapSphere | |
bool | AnyOverlapBox | |
bool | AnyOverlapBox | |
int32_t | PointOverlapActors | |
int32_t | PointOverlapActors | |
int32_t | OverlapSphereByProfile | |
void | SetTraceComplexity | |
void | SetTraceBackFaces | |
void | SetTraceIgnoreTriggers | |
void | ResetTraceOptions | |
std::string | GetLastHitSurface | What the struck surface is made of — the physics material's surface type (Concrete, Metal, Grass, ...), read per triangle on a mesh collider. |
std::string | GetTraceHitSurface | |
int32_t | GetTraceHitCount | |
AActor* | GetTraceHitActor | |
Vec3 | GetTraceHitLocation | |
Vec3 | GetTraceHitNormal | |
bool | IsTraceHitBlocking | True when the hit at index stopped the trace, false when it was an overlap the trace passed through. |
void | PlaySoundAtLocation | |
bool | TravelToScene | |
std::string | GetCurrentSceneName | |
void | SetWorldOverride | |
MWorld* | ResolveWorld |
Function details
GetWorldDeltaSeconds
float GetWorldDeltaSeconds() constGetTimeSeconds
float GetTimeSeconds() constGetRealTimeSeconds
float GetRealTimeSeconds() constSetGamePaused
void SetGamePaused(bool paused)IsGamePaused
bool IsGamePaused() constSetGlobalTimeDilation
void SetGlobalTimeDilation(float dilation)GetGlobalTimeDilation
float GetGlobalTimeDilation() constSpawnActorByClass
AActor* SpawnActorByClass(const std::string& className, const Vec3& position)DestroyActor
void DestroyActor(AActor* actor)GetActorLocation
Vec3 GetActorLocation(AActor* actor) constSetActorLocation
void SetActorLocation(AActor* actor, const Vec3& location)GetActorRotationEuler
Vec3 GetActorRotationEuler(AActor* actor) constSetActorRotationEuler
void SetActorRotationEuler(AActor* actor, const Vec3& degrees)GetPlayerPawn
AActor* GetPlayerPawn() constGetGameInstance
MGameInstance* GetGameInstance() constApplyDamage
float ApplyDamage(AActor* target, float amount, AActor* instigator)IsActorDead
bool IsActorDead(AActor* target) constGetDistance
float GetDistance(AActor* a, AActor* b) constLineTraceByChannel
bool LineTraceByChannel(const Vec3& start, const Vec3& end)The reflected two-arg form traces Visibility (Visual Script nodes and existing graphs call it with exactly two inputs — the VM's arity check is strict, so the channel rides an unreflected overload instead of a third param).
LineTraceByChannel
bool LineTraceByChannel(const Vec3& start, const Vec3& end, ECollisionChannel traceChannel)GetLastHitLocation
Vec3 GetLastHitLocation() constGetLastHitActor
AActor* GetLastHitActor() constGetLastHitNormal
Vec3 GetLastHitNormal() constGetLastHitDistance
float GetLastHitDistance() constSphereTraceByChannel
bool SphereTraceByChannel(const Vec3& start, const Vec3& end, float radius)Sweep and overlap verbs over the same channel filtering. Each fills the shared hit buffer read by GetTraceHit*, so a graph traces once and then walks the results; the single-hit forms also refresh GetLastHit*.
SphereTraceByChannel
bool SphereTraceByChannel(const Vec3& start, const Vec3& end, float radius, ECollisionChannel traceChannel)LineTraceMultiByChannel
int32_t LineTraceMultiByChannel(const Vec3& start, const Vec3& end)Every body the trace passed through, in order, ending with the one that blocked it. Returns the hit count.
LineTraceMultiByChannel
int32_t LineTraceMultiByChannel(const Vec3& start, const Vec3& end, ECollisionChannel traceChannel)SphereTraceMultiByChannel
int32_t SphereTraceMultiByChannel(const Vec3& start, const Vec3& end, float radius)SphereTraceMultiByChannel
int32_t SphereTraceMultiByChannel(const Vec3& start, const Vec3& end, float radius, ECollisionChannel traceChannel)CapsuleTraceByChannel
bool CapsuleTraceByChannel(const Vec3& start, const Vec3& end, float radius, float halfHeight)An upright capsule — the shape of a character — swept from start to end: "would a pawn fit through here" rather than "would a ball". Half height is the cylinder's half, the hemispherical caps come on top of it.
CapsuleTraceByChannel
bool CapsuleTraceByChannel(const Vec3& start, const Vec3& end, float radius, float halfHeight, ECollisionChannel traceChannel)CapsuleTraceMultiByChannel
int32_t CapsuleTraceMultiByChannel(const Vec3& start, const Vec3& end, float radius, float halfHeight)CapsuleTraceMultiByChannel
int32_t CapsuleTraceMultiByChannel(const Vec3& start, const Vec3& end, float radius, float halfHeight, ECollisionChannel traceChannel)OverlapSphereActors
int32_t OverlapSphereActors(const Vec3& center, float radius)Narrow-phase overlap: a body counts only when its actual shape is inside the volume, not merely its bounding box. Both fill the shared hit buffer.
OverlapSphereActors
int32_t OverlapSphereActors(const Vec3& center, float radius, ECollisionChannel traceChannel)OverlapBoxActors
int32_t OverlapBoxActors(const Vec3& center, const Vec3& halfExtents)OverlapBoxActors
int32_t OverlapBoxActors(const Vec3& center, const Vec3& halfExtents, ECollisionChannel traceChannel)OverlapCapsuleActors
int32_t OverlapCapsuleActors(const Vec3& center, float radius, float halfHeight)OverlapCapsuleActors
int32_t OverlapCapsuleActors(const Vec3& center, float radius, float halfHeight, ECollisionChannel traceChannel)LineTraceAny
bool LineTraceAny(const Vec3& start, const Vec3& end)Existence tests that stop at the first body that qualifies, and a point probe. The overlap and point verbs fill the shared hit buffer, nearest first; the Any verbs only answer yes or no.
LineTraceAny
bool LineTraceAny(const Vec3& start, const Vec3& end, ECollisionChannel traceChannel)SphereTraceAny
bool SphereTraceAny(const Vec3& start, const Vec3& end, float radius)SphereTraceAny
bool SphereTraceAny(const Vec3& start, const Vec3& end, float radius, ECollisionChannel traceChannel)AnyOverlapSphere
bool AnyOverlapSphere(const Vec3& center, float radius)AnyOverlapSphere
bool AnyOverlapSphere(const Vec3& center, float radius, ECollisionChannel traceChannel)AnyOverlapBox
bool AnyOverlapBox(const Vec3& center, const Vec3& halfExtents)AnyOverlapBox
bool AnyOverlapBox(const Vec3& center, const Vec3& halfExtents, ECollisionChannel traceChannel)PointOverlapActors
int32_t PointOverlapActors(const Vec3& point)PointOverlapActors
int32_t PointOverlapActors(const Vec3& point, ECollisionChannel traceChannel)OverlapSphereByProfile
int32_t OverlapSphereByProfile(const Vec3& center, float radius, const std::string& profile)SetTraceComplexity
void SetTraceComplexity(int32_t mode)SetTraceBackFaces
void SetTraceBackFaces(int32_t mode)SetTraceIgnoreTriggers
void SetTraceIgnoreTriggers(bool ignore)ResetTraceOptions
void ResetTraceOptions()GetLastHitSurface
std::string GetLastHitSurface() constWhat the struck surface is made of — the physics material's surface type (Concrete, Metal, Grass, ...), read per triangle on a mesh collider. The name footsteps, impact effects and decals key on.
GetTraceHitSurface
std::string GetTraceHitSurface(int32_t index) constGetTraceHitCount
int32_t GetTraceHitCount() constGetTraceHitActor
AActor* GetTraceHitActor(int32_t index) constGetTraceHitLocation
Vec3 GetTraceHitLocation(int32_t index) constGetTraceHitNormal
Vec3 GetTraceHitNormal(int32_t index) constIsTraceHitBlocking
bool IsTraceHitBlocking(int32_t index) constTrue when the hit at index stopped the trace, false when it was an overlap the trace passed through.
PlaySoundAtLocation
void PlaySoundAtLocation(const std::string& clipPath, const Vec3& position, float volume)TravelToScene
bool TravelToScene(const std::string& scenePath)GetCurrentSceneName
std::string GetCurrentSceneName() constSetWorldOverride
static void SetWorldOverride(MWorld* world)ResolveWorld
static MWorld* ResolveWorld()