Link Search Menu Expand Document

Sample Line Trace

PCGEx | Sample : Line Trace

Sample environment using line casting

The Line Trace node performs a single line trace for each point, using a local attribute or property as direction & size.


In
Points that will be used as origin for line tracing
Point Filters
Points filters used to determine which points will be processed. Filtered out points will be treated as failed sampling.
Actor References
Points containing actor references, if that mode is selected.
Out
In with extra attributes and properties

Table of content


The Line Trace node allows you to perform a single per-point line trace and output data from that trace.

Please note that this node is not tracking traced actors. If you change the sampled environment you will need to manually regenerate the graph unless something else already triggers a refresh in editor.

details/sampling-line-trace/lead.png

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.
Trace
Direction FVector attribute to read per-point trace direction from.
Max Distance Maximum distance for the trace
Local Max Distance If enabled, fetches the max distance on a per-point basis using the specified attribute.

Outputs

Outputs are values extracted from the line trace, and written to attributes on the output points.

Output Description
Generic
Success
bool
TBD
Spatial Data
Location
FVector
TBD
Look At
FVector
TBD
Normal
FVector
TBD
Distance
double
TBD
Is Inside
bool
TBD
Actor Data
Actor Reference
FSoftObjectPath
TBD
Phys Mat
FSoftObjectPath
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 line trace has been successful.
Has No Successes Tag If enabled, add the specified tag to the output data if all line trace 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.