Skip to content
Orbdale

Orbdale Terrain · OrbdaleTerrain module · member function

UOrbdaleTerrainLibrary::

GetGradeAlong

Blueprint

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

Declaration

UFUNCTION(BlueprintCallable, Category="Orbdale|Terrain|Query", meta=(AutoCreateRefTerm="Location,Direction", WorldContext="WorldContextObject"))
static bool GetGradeAlong(const UObject* WorldContextObject, const FVector& Location, const FVector& Direction, double& OutGrade,
                          EOrbdaleTerrainSurface Surface = EOrbdaleTerrainSurface::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 (EOrbdaleTerrainSurface): Modified
    • Out Out Grade (Double): not connected
    • Out Return Value (Boolean): not connected
Header
#include "OrbdaleTerrainLibrary.h"
Module
PublicDependencyModuleNames.Add("OrbdaleTerrain"); in your module’s Build.cs.
Stability
Stable: changes within a major version only add.
Thread
Game thread (Blueprint). (the rule of UOrbdaleTerrainLibrary)
Blueprint
Get Grade Along, in Orbdale › 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.

SurfaceEOrbdaleTerrainSurfaceEOrbdaleTerrainSurface::Modified

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

Returns

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