Reverse the order we acquire the entityTree & holdActions locks, to avoid deadlocks when the network thread also acquires them.
The network thread does this when hold actions from other avatars are received.
In the game loop, physics occurs before avatar update.
Before this PR, when the avatar is moved during avatar update, near grabbed objects will not pick up this move until one frame later, when
the physics is run on the next update.
After this PR, near grabbed objects are adjusted to reflect any position or rotation change that occurred during the avatar update.
You can do this by parenting an entity to an avatar's -2 joint index.
This will mean that the entity will follow the avatar as it moves in the world, but
will not follow the avatar's position as it moves in sensor space. Essentially, this
gives you the ability to place objects in the user's physical room.
WebTablets now are located in this feature and no longer jitter.
* Removed MyAvatar.reset() access from JavaScript
* Added HMD.centerUI() to JavaScript, which can be used to reset the 3D UI sphere around the current HMD orientation.
* Added MyAvatar.clearIKJOintLimitHistory() which can be used to reset any remembered IK joint limit history.
* Added MyAvatar.centerBody() which can be used to instantly re-orient the avatar's so that the hips and toes
are facing the same direction as the current HMD orientation.
away.js now uses the above new API's instead of MyAvatar.reset()
* When the overlay is hidden because your head is too close to the sphere,
instead of coming back immediately, it waits until the avatar's velocity is near zero
for a period of time.
* Hooked up jump and fly to MyAvatar::hasDriveInput()
* Added an internal state machine to OverlayConductor to manage hiding/showing transitions.
* The overlay menu state is now tied directly to the overlay, so it will change state as the
overlay is dynamically hidden/shown from code.
* Removed slot going directly from MenuOption::Overlays directly to OverlayConductor::setEnable().
Previously the HUD fading in/out would also recenter the hmd sensor and the avatar, which caused many problems including:
* The user's view could shift vertically.
* Your avatar would briefly go into t-pose
* other users would see your avatar go into t-pose.
Now we now move the UI sphere instead, which results in a much smoother experience.
MyAvatar: added hasDriveInput method.
OverlayConductor:
* removed avatar and sensor reset, instead the overlay's modelTransform is changed.
* revived STANDING mode, which is active if myAvatar->getClearOverlayWhenDriving() is true and you are wearing an HMD.
* SITTING & FLAT mode should be unchanged.
* Instead of using avatar velocity to fade out/fade in the hud, We use the presense or absanse of avatar drive input.
* Additionally, we check distance to the UI sphere, and quickly recenter the hud if the users head is too close to the actual hud sphere.
CompositorHelper:
* Bug fixes for ray picks not using the modelTransform.
HmdDisplayPlugin:
* Bug fixes for rendering not using the modelTransform.
Used to disable the 'room-scale' avatar re-centering code.
Disabling this can prevent sliding when the avatar is supposed to be sitting or mounted on a stationary object.
Also, removed a bunch of old, unused leaning and torso twisting code.