.. | ||
appResources | ||
marketplaceResources | ||
README.md |
Sit Point Script
Description
Make any entity sittable whether it's a chair, bench, couch, log, or even a tree stump.
Either import Sit Point from the marketplace to put on entities for one or more seats per entity or make a sittable entity yourself with one seat! See Setup > Add scripts to your entity
Releases
2019-01-17_14-57-17 :: [sitScriptUpdate ded8ecbc78a44c3c830e1f42fed6dd8e9277a4c1]
- During Create Mode when the entity has 0.5 alpha value or less, a local visible cube is added for easier adjustments. The visible cube disappears once Create mode is closed.
2019-04-17_13-05-00 :: [sitScriptUpdate 99c1e875]
- Sittable overlay converted to local entity
- Draws sittable overlay in terms of local coordinates of the cube
Known issues
Solution to other entities taking the "Click to Sit" click events
Collisions with other entity's invisible collision hulls sometimes make it difficult to sit. Ensure entities near sit cubes have the property ignorePickIntersection: true
.
Avatar is tilted after standing up when Sit Point is tilted
When a sit point is at an angle other than horizontal to the floor, on standup the avatar will be stand at that angle. To fix: use the goto menu and visit another domain. teleport to a friend, or sit again in a horizontal chair.
Sit animation does not apply to an avatar using a different default animation
Animation that is applied before sitting is applied while in the chair and continues after standup.
Known issues
Future features
Configurable variables:
- Custom animations specified via userData
- All configurable variables specified via userData
Setup
Import sit cube via JSON
- Download the opaqueSitCube.json or invisibleSitCube.json located in /json folder
- Update the script client and script server links to the hosted sitClient.js and sitServer.js links
- Save updated json file
- Open Create Mode in High Fidelity
- Click on "Create Tools" > "Create" > "Import Entities (.JSON)"
- Select the .json file to import
- Sit on imported sit cube!
Manually add scripts to your entity in High Fidelity
- Fork the hifi-content repo
- Configure sitClient.js script and save. See Configurations > Configurable variables in Script
- Configure the entity in High Fidelity Create Mode. See Configurations > Configurable adjustments in Create Mode
- Host the marketplaceItems/sitPoint folder on a hosting service like Amazon S3
- Paste the hosted sitClient.js script url into the entity client script link
- Paste the hosted sitServer.js script url into the entity server script link
- Ensure both are running
- Sit!
Configurations
Configurable adjustments in Create Mode
- Adjust seat center - update the "Pivot" (to adjust the "registrationPoint" entity property) Ex: a stool for an avatar to sit in the middle on top, Pivot = { x: 0.5, y: 1.0, z: 0.5 }
Configurable variables in Script
- SHOW_PRESIT_OVERLAY_IN_HMD - Turn on/off "Face Forward Overlay" before sit in HMD
- CHAIR_OFFSET_RATIO - Used to calculate pin hip position. Adds CHAIR_OFFSET_RATIO * chair's y dimension to the y center of the seat.
Happy sitting!