Simple hover effect
BlockStack is now on Testflight! Try the game for free here.
Following from adding advanced gestures, we can make the interaction easier by adding a hover effect.
Simple hover effect
Adding HoverEffectComponent() #
In the shared view model, when adding components
, add the HoverEffectComponent:
shape.components.set(HoverEffectComponent())
As long as the entities have an InputTargetComponent and CollisionComponent they will receive hover effects. Those were added in previous posts.
And that's it! The documentation suggests being able to customise the effect but I've not managed to get the examples working yet. I'll update here if I do so.
- Previous: Advanced gestures
- Next: Build a Jenga game in visionOS