Create custom UI panelsBuild an interactive custom UIPlayer-specific custom UIVideo Presentation on how to build performant CUIsHands-On Challenge Overview
This challenge focuses on setting up and optimizing grab interactions for mobile users, ensuring objects feel natural and intuitive to hold.
You’ll learn how to:
- Make an object grabbable.
- Differentiate between physics and non-physics grabs.
- Use Grab Anchors to define a custom holding position (grip pose).
- Test and refine grab interactions for mobile.
Estimated Time: 1 hour
What You'll Need:
- Windows PC
- Access to the Worlds Desktop Editor
Challenge Steps:
1. Create a Grabbable Object
- Create a simple object you want players to pick up. A coffee mug is a great example. You can search for one in the public assets.
- In the object's Properties panel, you can set its physics behavior.
- Non-physics grab: The object remains unaffected by gravity when released by the player. To set this, set the Motion to Interactive, the Interactivity to Grabbabe.
- Physics-based grab: The object will react to gravity and collisions. This is great for throwable items like a ball. To set this, set the Motion to Interactive, the Interactivity to Both, and ensure the object has collision enabled.
2. Set the Grip Pose and Grab Anchor
- With the object selected, go to its Properties panel and select one of the many Grip Poses. This determines the player’s animation when holding the object.
- You can also enable Grab Anchor. This allows you to control exactly where the player's hand will attach.
- By default, the hand will grab the object's center. Adjust the anchor position and rotation.
3. Test Your Grabbable Object
- Enter Preview Mode to test the interaction.
- Observe how your avatar's hand attaches to the object. Does it look natural? If not, exit preview mode and continue adjusting the grab anchor settings until it feels right.
- Test our throwing the physics-enabled object.
Level Up:
- Add sound effects that play when the object is grabbed and released to provide players with more feedback.
- Use scripting to implement force hold and force release. For example, create a button that forces a player to grab an object and another that forces them to release it. This can be useful for creating guided experiences or tool management systems.
Need Help?
Related Links