Agrarsense
|
#include <PhysicsUtilities.h>
Static Public Member Functions | |
static bool | SnapActorToGround (AActor *Actor, float StartZOffset=600.0f, float EndZOffset=600.0f) |
static bool | SnapActorAboveGround (AActor *Actor, float AboveOffset=50.0f) |
static bool | DoesTopPercentageMeshOverlap (AActor *Actor, const UStaticMesh *Mesh, float TopPercentage, ECollisionChannel CollisionChannel) |
static bool | HasOverlappingActors (const UStaticMesh *StaticMesh, const FTransform &Transform) |
static TArray< AActor * > | FindOverlappingActorsInSphere (const FTransform &ActorTransform, float Radius, bool DebugVisualizeRadius=false) |
template<typename T > | |
static TArray< T * > | FindOverlappingActorsOfClass (const FTransform &ActorTransform, float Radius, bool DebugVisualizeRadius=false) |
UPhysicsUtilities is collection of static functions for Physics related utilities.
Definition at line 19 of file PhysicsUtilities.h.
|
static |
Checks if the top percentage of a given mesh overlaps with any other objects.
Actor | The actor to check for overlap with. |
Mesh | The static mesh to check for overlap with. |
TopPercentage | The percentage of the mesh's top area to check for overlap (0.0 to 1.0). |
CollisionChannel | The collision channel to use for the overlap check. |
Definition at line 68 of file PhysicsUtilities.cpp.
References Transform.
|
static |
Finds all overlapping actors within a sphere.
ActorTransform | The transform of the actor to check for overlaps. |
Radius | The radius of the sphere. |
DebugVisualizeRadius | If true, visualizes the sphere for 2 seconds in the editor for debugging purposes. |
Definition at line 138 of file PhysicsUtilities.cpp.
|
static |
Finds all overlapping actors of a specific class within a sphere.
ActorTransform | The transform of the actor to check for overlaps. |
Radius | The radius of the sphere. |
DebugVisualizeRadius | If true, visualizes the sphere for 2 seconds in the editor for debugging purposes. |
Definition at line 144 of file PhysicsUtilities.cpp.
|
static |
Checks if there are any overlapping actors based on a provided static mesh and transform.
StaticMesh | The static mesh used to define the shape for overlap detection. |
Transform | The transform of the actor to check for overlapping actors. |
Definition at line 101 of file PhysicsUtilities.cpp.
References Transform.
|
static |
Snaps the given actor above ground
Actor | The actor to snap to the ground. |
AboveOffset | The offset value to the ground |
Definition at line 49 of file PhysicsUtilities.cpp.
References SnapActorToGround().
Referenced by UAssetLibrary::SpawnVehicle().
|
static |
Snaps the given actor to the ground by performing a line trace and adjusting its location.
Actor | The actor to snap to the ground. |
StartZOffset | The offset value added to the actor's original Z coordinate to determine the start location of the line trace. |
EndZOffset | The offset value subtracted from the actor's original Z coordinate to determine the end location of the line trace. |
Definition at line 17 of file PhysicsUtilities.cpp.
Referenced by SnapActorAboveGround(), and UAssetLibrary::TrySpawnActor().