Automatic Casting
Automatic casting in Reality refers to the straightforward conversion between data types, such as float to double or float to integer. This feature simplifies prototyping by eliminating the need to memorize data types, thus accelerating the design and development cycle. It also reduces the risk of data type-related errors, such as performing operations on incompatible data types.
See Also: Dynamic Node Operations
Example
- Add
UE5
node to nodegraph. - Add a tracking choice (e.g.,
Xync
node) to the canvas. - Add a
Break
node. - Connect the Track output pin of the
Xync
node to theInput
pin of theBreak
node. TheBreak
node inherits theTrack
output data structure as properties because it is dynamic. - Rename the
Break
node toXync Break
for better organization. - Spawn a
Reality Track Billboard
. - Check the data type of the
Location
output pin of theXync Break
node by hovering over, then click and hold the⌥ ALT
button on your keyboard. The Node Details Info Display shows theLocation
data type as vec3. - Check the
Talent Loc
input pin data type on theUE5
node using the same method. The Node Details Info Display shows that it is vec3d.
With automatic casting, you can directly connect the Location
output of the Xync Break
node to the Talent Loc
input of the UE5
node. The vec3 to vec3d
conversion is added automatically.