Skip to content

Commit e659669

Browse files
Update README.md to include debug property in holdable component documentation
1 parent d84805f commit e659669

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

docs/holdable/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ Add the `holdable` component to an entity you'd like to make grabbable, such as
2828

2929
## Properties
3030

31-
| Parameter | Type | Description | Default | Options |
32-
| --------- | ---- | --------------------------------------------------------------------------------- | ------- | ------------------------------------ |
33-
| position | vec3 | Local offset position where the object should be held (relative to controller). | `0 0 0` | Any position coordinates (in meters) |
34-
| rotation | vec3 | Local offset rotation applied when held (relative to controller). | `0 0 0` | Any rotation angles (in degrees) |
31+
| Parameter | Type | Description | Default | Options |
32+
| --------- | ---- | ---------------------------------------------------------------------------------------------- | ------- | ------------------------------------ |
33+
| position | vec3 | Local offset position where the object should be held (relative to controller). | `0 0 0` | Any position coordinates (in meters) |
34+
| rotation | vec3 | Local offset rotation applied when held (relative to controller). | `0 0 0` | Any rotation angles (in degrees) |
35+
| debug | bool | Outputs the relative position and rotation of held objects. Useful for setting custom offsets. | `false` | `true`, `false` |
3536

3637
**Notes**:
3738

3839
- Left-hand interactions are mirrored - position and rotation offsets are automatically flipped when grabbing with the left hand.
3940
- Using "0 0 0" for position or rotation will indicate no custom position or rotation. For rotation, this means the rotation will be the same as the object's original rotation when grabbed.
40-
- If using a custom rotation and position, just know that rotation pivots around the controller, not the model's center. It's easiest to set the custom rotation before position.
41+
- Rotation pivots around the controller, not the object. Set rotation before position for easier adjustments.
42+
- For easiest setup, enable `debug: true` and grab the object naturally. Then copy values from console (via [dev tools](https://developer.chrome.com/docs/devtools/remote-debugging) or [vr-logger](../../src/components/vr-logger/vr-logger.js) component).
4143

4244
## Behavior & Features
4345

0 commit comments

Comments
 (0)