Sample Nearest Surface
Sample information from the nearest mesh collision
The Sample Nearest Surface node performs spherical queries to find the closest point on nearby simple colliders within a set radius, sampling spatial data and actor references from overlapping surfaces and applying tags based on query results.
Table of content
The Sample Nearest Surface node allows you to perform a single per-point spherical query to find the closest point on the closest overlapping collider.
Please note that this node is not tracking actors. If you change the sampled environment you will need to manually regenerate the graph unless something else already triggers a refresh in editor.
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.
Properties
Property | Description |
---|---|
Settings | |
Surface Source | Select where you want to read surfaces from: either All (revealing additional actors picking parameters), or Actor References , to sample only specific actors. |
Actor Reference | Attribute to read actor reference from the Actor References input data. |
Max Distance | Maximum radius of the overlapping sphere |
Local Max Distance | If enabled, fetches the overlap sphere radius on a per-point basis using the specified attribute. |
Outputs
Outputs are values extracted from the overlap query, and written to attributes on the output points.
Output | Description |
---|---|
Generic | |
Successbool
| TBD |
Spatial Data | |
LocationFVector
| TBD |
Look AtFVector
| TBD |
NormalFVector
| TBD |
Distancedouble
| TBD |
Is Insidebool
| TBD |
Actor Data | |
Actor ReferenceFSoftObjectPath
| TBD |
Phys MatFSoftObjectPath
| TBD |
Extra properties
Forwarding
Data forwarding settings from the Actor References input points, if enabled.
“Forwarding” settings lets you pick-and-choose which attributes & tags carry over from some data to another.
Property | Description |
---|---|
Enabled | Whether attribute forwarding is enabled or not. |
Preserve Attributes Default Value | If enabled, the node will attempt to create attributes on the data in a way that preserve the original, underlying default value of the attribute. This can be critical in order to identify which data originally belonged to which, as well as properly initializing flags to a desirable default. |
Note that the filters look for a single valid match amongst the list; you cannot create and/or conditions.
Filter Details
Property | Description |
---|---|
Filter Mode | Chooses how the filter operates. - All let everything pass.- Exclude filters out the result of the filter.- Include only allows the items that pass the filters. |
Matches | Lets you define a list of checks pairs: a string value, and a Match Mode . |
Comma Separated Names | Easy to override, lets you specify a list of comma-separated names. The only caveat is that you can only pick a unique match mode used for each entry. |
Comma Separated Names Filter | Which filter will be used along the Comma Separated Names. |
Preserve PCGEx Data | Most of the time you’ll want to leave it to its default value. It ensures PCGEx/ prefixed data are not captured by the filter. |
Filter Modes
Mode | Description |
---|---|
Equals | Checks for strict equality of the filtered value and the associated string. |
Contains | Checks if the filtered value contains the associated string. |
Starts With | Checks if the filtered value is prefixed with the associated string. |
Ends With | Checks if the filtered value is suffixed with the associated string. |
Tagging
Some high level tags may be applied to the data based on overal sampling.
Tag | Description |
---|---|
Has Successes Tag | If enabled, add the specified tag to the output data if at least a single query has been successful. |
Has No Successes Tag | If enabled, add the specified tag to the output data if all queries failed. |
Note that fail/success tagging will be affected by points filter as well; since filtered out points are considered fails.
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. |
Advanced
Property | Description |
---|---|
Process Filtered Out As Fails | If enabled, mark filtered out points as “failed”. Otherwise, just skip the processing altogether. Only uncheck this if you want to ensure existing attribute values are preserved. Default is set to true, as it should be on a first-pass sampling. |