FREE TRIAL

|

☀
☾

Navigation.NavCast

NavCast(Ray, out UIBlockHit, UIBlock, UIBlock, bool, int)

Performs a navigation-specific raycast against all navigable UIBlocks under scope and retrieves a UIBlockHit for the nearest navigable UIBlock in the general direction of the provided ray.

Declaration
public static bool NavCast(Ray ray, out UIBlockHit blockHit, UIBlock ignore = null, UIBlock scope = null, bool navigablesOnly = true, int layerMask = -1)
Parameters
Type Name Description
Ray ray

A ray, in worldspace, to use for the navigation-specific raycast.

UIBlockHit blockHit

A UIBlockHit for the top-most-rendered navigable UIBlock in the provided ray's general direction.

UIBlock ignore

The UIBlock to exclude from the results, defaults to null. Useful for when a specific UIBlock should be filtered out.

UIBlock scope

The root of UIBlocks to test against, defaults to null. All UIBlocks in the scene are tested when scope == null.

bool navigablesOnly

Only include results with navigable elements? Defaults to true.

int layerMask

The gameobject layers to include, defaults to "All Layers".

Returns
Type Description
bool

true if any UIBlock (on the layerMask) is in the general direction of the provided ray.

☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC