ProjectPassthroughComponent¶
Contents |
Introduction¶
Here will assume you already known what is ProjectedPassthrough. If you don’t understand this feature, please check these native API:
And watch this video:
Use ProjectedPassthrough to show keyboard
To use the ProjectPassthrough, you need add a ProjectPassthroughComponent into an actor or your pawn first.
Through this component’s API, you can make your own projected passthrough.
Blueprint Functions¶
EnableProjectedPassthrough¶
Enable the ProjectedPassthrough feature.
DisableProjectedPassthrough¶
Disable the ProjectedPassthrough feature.
SetAlpha¶
Set the ProjectedPassthrough feature’s alpha value.
SetDirty¶
When you invoke other APIs, they will also set a dirty flag to force component to update when tick component. You can also call this API to let this comonent to force udpate.
SetReferenceTransform¶
The reference transform could be the tracking space origin. The mesh for ProjectedPassthrough feature should be in Tracking space. If you want to input a mesh vertices in world space, this component will use the reference transform to convert the world space vertices to tracking space vertices.
SetWorldTransform¶
Input the mesh’s pose in world space. To show the ProjectedPassthrough, you need input a mesh and set its model pose in tracking space. The SetReferenceTransform will help you tranfrom the world space pose to tracking space pose.
SetTransform¶
Input the mesh’s pose in tracking space. To show the ProjectedPassthrough, you need input a mesh and set its model pose in tracking space.
SetVerticesAndIndices¶
To show the ProjectedPassthrough, you need input a mesh. The mesh for this feature should be in Tracking space. Input the mesh’s vertices and indices. If your mesh is loaded from a model, use the parameter: is from Model to rotate the mesh’s front align with tracking’s front.
UseBuiltInCuboid¶
To show the ProjectedPassthrough, you need input a mesh. Use the built-in Cuboid mesh instead of using SetVerticesAndIndices. The default Cuboid will be a 1x1x1 meter cube. You can change its scale in 3 directions. And set the mesh’s pose by SetTransform or SetWorldTransform.
UseBuiltInQuad¶
To show the ProjectedPassthrough, you need input a mesh. Use the built-in Cuboid mesh instead of using SetVerticesAndIndices. The default Cuboid will be a 1x1 meter quad. You can change its scale in Y and Z directions. And set the mesh’s pose by SetTransform or SetWorldTransform.
How to use¶
You can reference to our Unreal sample level: ProjectedPassthroughTest.
You can update the mesh, pose and alpha when the ProjectedPassthrough feature is showing.