Link Search Menu Expand Document

Sample Nearest Surface

Sample information from the nearest mesh collision

The Sample Nearest Points node fetches all collisions within a given radius, and find the closest point on the closest collision. Works with simple colliders only.


In
Points that will be used as origin for finding & sampling the nearest surface
Out
In with extra attributes and properties

This node works with collisions and as such can be very expensive on large datasets.

Table of content


Note that this only works with simple collisions – ‘use complex as simple’ won’t work either.

Properties


Each output property is written individually for each point.

Property Description
Settings
Max Distance Maximum surface search distance.
Local Max Distance If enabled, will use a local property or attribute as Max Distance.
Outputs
Success Attribute Name Writes a boolean attribute to each point specifying whether the sampling has been successful (true) or not (false).
Sampling is considered unsuccessful if there was no point within the specified range.
Location Attribute Name Writes the sampled location, as an FVector.
Look at Attribute Name Writes the direction from the point to the sampled location, as an FVector.
Normal Attribute Name Writes the normal of the surface at the sampled, as an FVector.
Distance Attribute Name Writes the distance between the point and the sampled location, as a double.

Collision Settings


Collision Settings

These settings drive which objects will be ignored during the collision checks.

Property Description
Trace Complex Whether to collide against complex or simple collision.
Note that this setting may not be supported everywhere.
Collision Type The type of collision check. Can be one of:
-Channel
-ObjectType
-Profile
The selected mode changes which settings are available.
Collision Channel Lets you pick the collision channel to check against.
Collision Object Type Lets you pick the object type to check against.
Collision Profile Name Lets you set a custom profile name to check against.
Ignore Self If enabled, will ignore the current PCG Component’ actor owner.
Ignored Actor Selector Vanilla PCG Actor Selector.

Important note: under the hood this find the closest point on the closest collider – this feature is only supported for simple collider and won’t work on complex ones.