Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrain module · member function

UOrreryTerrainLibrary::

GetGradeAlong

Blueprint

Rise over run of the ground along a horizontal direction (0.1 = 10 percent, positive uphill).

Declaration

UFUNCTION(BlueprintCallable, Category="Orrery|Terrain|Query", meta=(AutoCreateRefTerm="Location,Direction", WorldContext="WorldContextObject"))
static bool GetGradeAlong(const UObject* WorldContextObject, const FVector& Location, const FVector& Direction, double& OutGrade,
                          EOrreryTerrainSurface Surface = EOrreryTerrainSurface::Modified);
Blueprint Get Grade Along
The graph as text
  1. Get Grade Along (function call)
    • In Location (Vector): (0.0, 0.0, 0.0)
    • In Direction (Vector): (0.0, 0.0, 0.0)
    • In Surface (EOrreryTerrainSurface): Modified
    • Out Out Grade (Double): not connected
    • Out Return Value (Boolean): not connected
Header
#include "OrreryTerrainLibrary.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrain"); in your module’s Build.cs.
Stability
Stable: changes within a major version only add.
Thread
Game thread (Blueprint). (the rule of UOrreryTerrainLibrary)
Blueprint
Get Grade Along, in Orrery › Terrain › Query

Parameters

NameTypeDefaultMeaning
WorldContextObjectconst UObject*—

Any object in the world whose terrain is read; supplies the world.

Locationconst FVector&—

World cm; Z is ignored.

Directionconst FVector&—

World direction; Z is ignored and the length does not matter.

OutGradedouble&—

Rise over run, positive uphill; 0 when there is no answer.

SurfaceEOrreryTerrainSurfaceEOrreryTerrainSurface::Modified

Which ground to read (EOrreryTerrainSurface); Modified is the current ground.

Returns

false when there is no ground, or the direction has no horizontal part.