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.

../_images/ProjPT_CreateProjectedPassthroughComponent.PNG

Through this component’s API, you can make your own projected passthrough.

Blueprint Functions

EnableProjectedPassthrough

../_images/ProjPT_EnableProjectedPassthrough.PNG

Enable the ProjectedPassthrough feature.

DisableProjectedPassthrough

../_images/ProjPT_DisableProjectedPassthrough.PNG

Disable the ProjectedPassthrough feature.

SetAlpha

../_images/ProjPT_SetAlpha.PNG

Set the ProjectedPassthrough feature’s alpha value.

SetDirty

../_images/ProjPT_SetDirty.PNG

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

../_images/ProjPT_SetReferenceTransform.PNG

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

../_images/ProjPT_SetWorldTransform.PNG

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

../_images/ProjPT_SetTransform.PNG

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

../_images/ProjPT_SetVerticesAndIndices.PNG

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

../_images/ProjPT_UseBuiltInCuboid.PNG

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

../_images/ProjPT_UseBuiltInQuad.PNG

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.