G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
FHitResult Struct Reference

Structure containing information about one hit of a trace, such as point of impact and surface normal at that point. More...

Public Member Functions

Functions
void SetActor (AActor Actor)
bool GetbBlockingHit () const
bool GetbStartPenetrating () const
UPrimitiveComponent GetComponent () const
UPhysicalMaterial GetPhysMaterial () const
void Reset ()
AActor GetActor () const
void SetbBlockingHit (bool bIsBlocking)
void SetBlockingHit (bool bIsBlocking)
void SetbStartPenetrating (bool bStartPenetrating)
void SetComponent (UPrimitiveComponent Component)
FHitResult & opAssign (FHitResult Other)

Public Attributes

Variables
FVector Location
 The location in world space where the moving shape would end up against the impacted object, if there is a hit. Equal to the point of impact for line tests. Example: for a sphere trace test, this is the point where the center of the sphere would be located when it touched the other object. For swept movement (but not queries) this may not equal the final location of the shape since hits are pulled back slightly to prevent precision issues from overlapping another surface.
float32 PenetrationDepth
 If this test started in penetration (bStartPenetrating is true) and a depenetration vector can be computed, this value is the distance along Normal that will result in moving out of penetration. If the distance cannot be computed, this distance will be zero.
float32 Distance
 The distance from the TraceStart to the Location in world space. This value is 0 if there was an initial overlap (trace started inside another colliding object).
float32 Time
 'Time' of impact along trace direction (ranging from 0.0 to 1.0) if there is a hit, indicating time between TraceStart and TraceEnd. For swept movement (but not queries) this may be pulled back slightly from the actual time of impact, to prevent precision problems with adjacent geometry.
FVector TraceStart
 Start location of the trace. For example if a sphere is swept against the world, this is the starting location of the center of the sphere.
FVector TraceEnd
 End location of the trace; this is NOT where the impact occurred (if any), but the furthest point in the attempted sweep. For example if a sphere is swept against the world, this would be the center of the sphere if there was no blocking hit.
FVector ImpactNormal
 Normal of the hit in world space, for the object that was hit by the sweep, if any. For example if a sphere hits a flat plane, this is a normalized vector pointing out from the plane. In the case of impact with a corner or edge of a surface, usually the "most opposing" normal (opposed to the query direction) is chosen.
FVector ImpactPoint
 Location in world space of the actual contact of the trace shape (box, sphere, ray, etc) with the impacted object. Example: for a sphere trace test, this is the point where the surface of the sphere touches the other object. @note: In the case of initial overlap (bStartPenetrating=true), ImpactPoint will be the same as Location because there is no meaningful single impact point to report.
int FaceIndex
 Face index we hit (for complex hits with triangle meshes).
FVector Normal
 Normal of the hit in world space, for the object that was swept. Equal to ImpactNormal for line tests. This is computed for capsules and spheres, otherwise it will be the same as ImpactNormal. Example: for a sphere trace test, this is a normalized vector pointing in towards the center of the sphere at the point of impact.
FName BoneName
 Name of bone we hit (for skeletal meshes).
AActor Actor
bool bBlockingHit
bool bStartPenetrating
UPrimitiveComponent Component
const UPhysicalMaterial PhysMaterial

Detailed Description

Structure containing information about one hit of a trace, such as point of impact and surface normal at that point.

Member Function Documentation

◆ GetActor()

AActor GetActor ( ) const

◆ GetbBlockingHit()

bool GetbBlockingHit ( ) const

◆ GetbStartPenetrating()

bool GetbStartPenetrating ( ) const

◆ GetComponent()

UPrimitiveComponent GetComponent ( ) const

◆ GetPhysMaterial()

UPhysicalMaterial GetPhysMaterial ( ) const

◆ opAssign()

FHitResult & opAssign ( FHitResult Other)

◆ Reset()

void Reset ( )

◆ SetActor()

void SetActor ( AActor Actor)

◆ SetbBlockingHit()

void SetbBlockingHit ( bool bIsBlocking)

◆ SetBlockingHit()

void SetBlockingHit ( bool bIsBlocking)

◆ SetbStartPenetrating()

void SetbStartPenetrating ( bool bStartPenetrating)

◆ SetComponent()

void SetComponent ( UPrimitiveComponent Component)

Member Data Documentation

◆ Actor

AActor Actor

◆ bBlockingHit

bool bBlockingHit

◆ BoneName

FName BoneName

Name of bone we hit (for skeletal meshes).

◆ bStartPenetrating

bool bStartPenetrating

◆ Component

◆ Distance

float32 Distance

The distance from the TraceStart to the Location in world space. This value is 0 if there was an initial overlap (trace started inside another colliding object).

◆ FaceIndex

int FaceIndex

Face index we hit (for complex hits with triangle meshes).

◆ ImpactNormal

FVector ImpactNormal

Normal of the hit in world space, for the object that was hit by the sweep, if any. For example if a sphere hits a flat plane, this is a normalized vector pointing out from the plane. In the case of impact with a corner or edge of a surface, usually the "most opposing" normal (opposed to the query direction) is chosen.

◆ ImpactPoint

FVector ImpactPoint

Location in world space of the actual contact of the trace shape (box, sphere, ray, etc) with the impacted object. Example: for a sphere trace test, this is the point where the surface of the sphere touches the other object. @note: In the case of initial overlap (bStartPenetrating=true), ImpactPoint will be the same as Location because there is no meaningful single impact point to report.

◆ Location

FVector Location

The location in world space where the moving shape would end up against the impacted object, if there is a hit. Equal to the point of impact for line tests. Example: for a sphere trace test, this is the point where the center of the sphere would be located when it touched the other object. For swept movement (but not queries) this may not equal the final location of the shape since hits are pulled back slightly to prevent precision issues from overlapping another surface.

◆ Normal

FVector Normal

Normal of the hit in world space, for the object that was swept. Equal to ImpactNormal for line tests. This is computed for capsules and spheres, otherwise it will be the same as ImpactNormal. Example: for a sphere trace test, this is a normalized vector pointing in towards the center of the sphere at the point of impact.

◆ PenetrationDepth

float32 PenetrationDepth

If this test started in penetration (bStartPenetrating is true) and a depenetration vector can be computed, this value is the distance along Normal that will result in moving out of penetration. If the distance cannot be computed, this distance will be zero.

◆ PhysMaterial

const UPhysicalMaterial PhysMaterial

◆ Time

float32 Time

'Time' of impact along trace direction (ranging from 0.0 to 1.0) if there is a hit, indicating time between TraceStart and TraceEnd. For swept movement (but not queries) this may be pulled back slightly from the actual time of impact, to prevent precision problems with adjacent geometry.

◆ TraceEnd

FVector TraceEnd

End location of the trace; this is NOT where the impact occurred (if any), but the furthest point in the attempted sweep. For example if a sphere is swept against the world, this would be the center of the sphere if there was no blocking hit.

◆ TraceStart

FVector TraceStart

Start location of the trace. For example if a sphere is swept against the world, this is the starting location of the center of the sphere.