Can't Tap

I am attempting to execute actions after clicking an entity in Reality View using the Behaviors component. I have added the Input Target component and the Tap gesture as follows:

TapGesture().targetedToAnyEntity()
    .onEnded({ value in
        _ = value.entity.applyTapForBehaviors()
    })
)

However, during testing, I have observed that the entity does not appear to recognize the click gesture. Could you kindly provide any relevant documentation or guidance on this matter?

Answered by Vision Pro Engineer in 800591022

Hello @lijiaxu:

In addition to an InputTargetComponent, your entity also needs a CollisionComponent. For additional detail, please consider these resources:

Thanks,
Steve

Accepted Answer

Hello @lijiaxu:

In addition to an InputTargetComponent, your entity also needs a CollisionComponent. For additional detail, please consider these resources:

Thanks,
Steve

Can't Tap
 
 
Q