Skip to content

Commit

Permalink
attach points (#397)
Browse files Browse the repository at this point in the history
* attach points

* added note
  • Loading branch information
nearnshaw committed May 20, 2024
1 parent fd848c0 commit 06d48fc
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions content/creator/sdk7/3d-essentials/entity-positioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,15 +395,45 @@ When creating an `AvatarAttach` component, pass an object with the following dat
- `avatarId`: _Optional_ The ID of the player to attach to. This is the same as the player's Ethereum address, for those players connected with an Ethereum wallet. If not speccified, it attaches the entity to the local player's avatar.
- `anchorPointId`: What anchor point on the avatar skeleton to attach the entity, using a value from the enum `AvatarAnchorPointType`.
The following anchor points are available on the player:
- `AvatarAnchorPointType.AAPT_NAME_TAG`: Floats right above the player's name tag, isn't affected by the player's animations.
The following anchor points are available on the `AvatarAnchorPointType` enum:
- `AAPT_RIGHT_HAND`: Fixed on the player's right hand
- `AAPT_LEFT_HAND`: Fixed on the player's left hand
- `AAPT_HEAD`: Fixed to center of the player's head.
- `AAPT_NECK`: Fixed to the player's base of the neck.
- `AAPT_SPINE`: Fixed to the top section of the backbone.
- `AAPT_SPINE1`: Fixed to the mid section of the backbone.
- `AAPT_SPINE2`: Fixed to the lower section of the backbone.
- `AAPT_HIP`: Fixed to the hip bone.
- `AAPT_LEFT_SHOULDER`: Fixed to the left shoulder.
- `AAPT_LEFT_ARM`: Fixed to the left first arm bone, at the height of the shoulder.
- `AAPT_LEFT_FOREARM`: Fixed to the left forearm bone.
- `AAPT_LEFT_HAND_INDEX`: Fixed to the tip of the left index finger.
- `AAPT_RIGHT_SHOULDER`: Fixed to the right shoulder.
- `AAPT_RIGHT_ARM`: Fixed to the right first arm bone, at the height of the shoulder.
- `AAPT_RIGHT_FOREARM`: Fixed to the right forearm bone.
- `AAPT_RIGHT_HAND_INDEX`: Fixed to the tip of the right index finger.
- `AAPT_LEFT_UP_LEG`: Fixed to the top leg bone on the left leg.
- `AAPT_LEFT_LEG`: Fixed to the bottom leg bone on the left leg.
- `AAPT_LEFT_FOOT`: Fixed to the ankle on the left leg.
- `AAPT_LEFT_TOE_BASE`: Fixed to the tip of the toe on the left leg.
- `AAPT_RIGHT_UP_LEG`: Fixed to the top leg bone on the right leg.
- `AAPT_RIGHT_LEG`: Fixed to the bottom leg bone on the right leg.
- `AAPT_RIGHT_FOOT`: Fixed to the ankle on the right leg.
- `AAPT_RIGHT_TOE_BASE`: Fixed to the tip of the toe on the right leg.
- `.AAPT_NAME_TAG`: Floats right above the player's name tag, isn't affected by the player's animations.
> Note: The name tag height is dynamically adjusted based on the height of the wearables a player has on. So a player wearing a tall hat will have their name tag a little bit higher than others.
- `AvatarAnchorPointType.AAPT_POSITION`: The player's overall position.
- `AvatarAnchorPointType.AAPT_RIGHT_HAND`: Is fixed on the player's right hand
- `AvatarAnchorPointType.AAPT_LEFT_HAND`: Is fixed on the player's left hand
- `AAPT_POSITION`: The player's overall position. This appears on the ground-level, between the avatar's feet.
> Note: A known issue may make items appear below the ground level, this is not the expected behavior and will be fixed in future versions.
{{< hint info >}}
**💡 Tip**: To use these values, write `AvatarAnchorPointType.` and VS Code will display the full list of options on a dropdown.
{{< /hint >}}
<img src="/images/avatar-attach-points.png" width="600"/>
Entity rendering is locally determined on each instance of the scene. Attaching an entity on one player doesn't make it visible to other players who are seeing that player. If an entity is attached to the default local player, each player will experience the entity as attached to their own avatar.
Expand Down
Binary file added static/images/avatar-attach-points.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 06d48fc

Please sign in to comment.