content/hifi-content/Experiences/Releases/marketPlaceItems/sitPoint/2019-04-17_13-05-00
Dale Glass e9f2e7633c Remove all files zero bytes in size
Seems like it might be tripping up LFS
2022-02-16 22:30:53 +01:00
..
appResources More files 2022-02-13 23:16:46 +01:00
marketplaceResources Remove all files zero bytes in size 2022-02-16 22:30:53 +01:00
README.md More files 2022-02-13 23:16:46 +01:00

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

  1. Download the opaqueSitCube.json or invisibleSitCube.json located in /json folder
  2. Update the script client and script server links to the hosted sitClient.js and sitServer.js links
  3. Save updated json file
  4. Open Create Mode in High Fidelity
  5. Click on "Create Tools" > "Create" > "Import Entities (.JSON)"
  6. Select the .json file to import
  7. Sit on imported sit cube!

Manually add scripts to your entity in High Fidelity

  1. Fork the hifi-content repo
  2. Configure sitClient.js script and save. See Configurations > Configurable variables in Script
  3. Configure the entity in High Fidelity Create Mode. See Configurations > Configurable adjustments in Create Mode
  4. Host the marketplaceItems/sitPoint folder on a hosting service like Amazon S3
  5. Paste the hosted sitClient.js script url into the entity client script link
  6. Paste the hosted sitServer.js script url into the entity server script link
  7. Ensure both are running
  8. 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!