Hover effect for RealityKit objects in spatial computing...only works with plain materials?

I was able to successfully add a hover effect to the default sphere when you create a new visionOS Volume project. The sphere did get slightly lighter when I "looked at" it in the simulator by mousing over it.

// Add the initial RealityKit content
if let scene = try? await Entity(named: "Scene", in: realityKitContentBundle) {
   //content.add(scene)
   if let sphere = scene.findEntity(named: "Sphere") {
      sphere.components.set(HoverEffectComponent())
      content.add(sphere)
   }
}

However, when I tried setting a HoverEffectComponent on an object that had PBR materials, there was no hover effect at all.

I would like for users to have the best experience when interacting with 3D objects in Vision Pro. This would include having an object (including those with PBR materials) highlight when they look at it to let them know they can interact with the object.

Is anyone else having this issue? Has anyone figured out how to get an object with PBR materials to display a hover effect?

On a side note, it sure would be nice if we could define a color and alpha value for the hover effect!

Replies

The HoverEffectComponent should work with PhysicallyBasedMaterials. However there are known issues with the HoverEffectComponent (for example it only affect its Entity and won't affect its children; see the visionOS Beta Release Notes). But if you are hitting other issues with the HoverEffectComponent, please submit bug reports on https://feedbackassistant.apple.com (ideally with a video and the code that reproduces the issue).

On a side note, it sure would be nice if we could define a color and alpha value for the hover effect!

Please file a feature request on https://feedbackassistant.apple.com, describing your use-case(s).