Commit graph

1445 commits

Author SHA1 Message Date
Anthony J. Thibault
89ae3b3d6e Revert "Merge pull request #8691 from highfidelity/out-of-body-experience"
This reverts commit efe9571ab8, reversing
changes made to 333e9ec7f4.
2016-12-05 15:18:03 -08:00
Anthony J. Thibault
49ce04e214 Revert "Merge pull request #9150 from hyperlogic/bug-fix/driving-while-flying-in-hmd"
This reverts commit a69d77ffbe, reversing
changes made to 996d3f5875.
2016-12-05 15:17:32 -08:00
Anthony J. Thibault
e8b5b56df7 Revert "Merge pull request #9151 from hyperlogic/bug-fix/reset-sensor-in-desktop-mode"
This reverts commit 119653bceb, reversing
changes made to a69d77ffbe.
2016-12-05 15:16:49 -08:00
Andrew Meadows
119653bceb Merge pull request #9151 from hyperlogic/bug-fix/reset-sensor-in-desktop-mode
Fix for reset sensors while in desktop mode.
2016-12-05 13:46:53 -08:00
Anthony J. Thibault
6d82410bc5 Fix for away.js teleporting user when in desktop mode
away.js calls MyAvatar.centerBody, however centerBody is only meaningful in HMD mode.
To guard against this, MyAvatar::centerBody is now a no-op if the application is not in HMD mode.
2016-12-05 10:53:20 -08:00
Anthony J. Thibault
349f0355ae Fix for reset sensors while in desktop mode.
Previously hitting ' a.k.a. reset sensors, would teleport you to the last
position you were in before you switched into desktop mode, or the spawn location.

This fixes that behavior but not re-centering the avatar while in desktop mode.
2016-12-05 10:42:20 -08:00
Anthony J. Thibault
a0f93dad2c Fix for driving/turning while flying in HMD mode
The internal MyAvatar:_sensorToWorldMatrix was being updated properly, however
the MyAvatar::_sensorToWorldMatrixCache was not. To fix this I've introduced
a new "mode" to updateSensorToWorldMatrix that does not change the sensorToWorldMatrix at all,
but properly copies the value to the cache and also updates hand controller poses etc.
2016-12-05 10:14:03 -08:00
Seth Alves
efe9571ab8 Merge pull request #8691 from highfidelity/out-of-body-experience
Room Scale HMD comfort features.
2016-12-01 11:09:39 -08:00
Andrew Meadows
445c730ca3 remove cruft, fix formatting and spelling 2016-12-01 10:38:13 -08:00
Atlante45
3035d43772 Merge branch 'master' of https://github.com/highfidelity/hifi into fix/settings 2016-11-21 13:05:08 -08:00
Anthony J. Thibault
38ac6fff03 Hand Controller rendering is camera relative
Basically, when using the third person camera in HMD mode.  If the controllers are shown.
They should be shown in front of the users camera, not in front of the users avatar.

To accomplish this, two new faux joint indices are introduced.
CAMERA_RELATIVE_CONTROLLER_RIGHTHAND_INDEX and CAMERA_RELATIVE_CONTROLLER_LEFTHAND_INDEX.

These joint indices can be used for Overlay parenting. (But not for entity parenting because they are not transmitted over the network).
They can also be queried for by using the MyAvatar.getAbsoluteJointRotationInObjectFrame() call.

These new indices are now used by the controllerDisplay.js for the hand controller rendering.
They are also used by system/libraries/controllers.js as the origin for hand controller grabbing and interaction lasers.
2016-11-17 11:33:12 -08:00
Andrew Meadows
a04b7ae297 fix hover-drive in HMD 2016-11-15 11:45:09 -08:00
Andrew Meadows
6bb3dd6830 Merge hifi/master into hifi/out-of-body-experience 2016-11-14 15:08:04 -08:00
Seth Alves
15c247fc5e quiet warnings 2016-11-11 06:37:22 -08:00
Stephen Birarda
020942c826 better handling for a flipped min/max scale 2016-11-10 16:50:36 -08:00
Stephen Birarda
88c63332de protect flipped min/max scale in avatar mixer settings 2016-11-10 16:21:48 -08:00
Stephen Birarda
272d0c845e add clarifying comments about target scale changes 2016-11-10 15:25:15 -08:00
Stephen Birarda
d5722c1654 fix clamping of scale and DRY it up 2016-11-10 15:03:13 -08:00
Stephen Birarda
9fdde49d14 clamp target scale changes on both ends 2016-11-10 14:54:42 -08:00
Stephen Birarda
6f442a74b1 request settings from agents and debug results 2016-11-10 14:43:15 -08:00
Stephen Birarda
77ede81fc9 limit MyAvatar scale to limits from domain settings 2016-11-10 13:27:13 -08:00
Andrew Meadows
ccdf383151 Merge hifi/master into hifi/out-of-body-experience 2016-11-07 08:24:26 -08:00
Seth Alves
f47aeae2a7 stop passing bare pointers to EntityTreeRenderer all around 2016-10-27 10:10:22 -07:00
Anthony J. Thibault
69bd4ccea2 Show hand controllers when out-of-body for more then 3/4 of a second
Without the timer, the hands can flicker in and out of visibility when lightly brushing against collision.
2016-10-24 18:16:05 -07:00
Andrew Meadows
8ecc23f62b HMD drive stops against simple walls 2016-10-24 08:26:44 -07:00
Andrew Meadows
66479808ba cleanup velocity calculation in HMD mode 2016-10-24 08:26:44 -07:00
Andrew Meadows
6f5f6d2493 adding ray shotgun scan for avatar motion
using the shotgun scan results to deterimine if slope is walkable
2016-10-17 17:58:52 -07:00
Anthony J. Thibault
81db8f7e08 Merge branch 'master' into out-of-body-experience 2016-10-13 17:27:15 -07:00
Brad Hefta-Gaub
37e58d123e Merge pull request #8793 from AndrewMeadows/recenter-above-ground2
prevent avatar from recentering below ground
2016-10-13 13:50:06 -07:00
Andrew Meadows
867fc3ccbf prevent avatar from recentering below ground 2016-10-12 13:23:44 -07:00
Anthony J. Thibault
ba4c356d7f Deadlock fix in avatar grab action.
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.
2016-10-12 11:05:19 -07:00
Atlante45
d5429e76da Warnings fixes and cleanup 2016-10-12 10:20:19 -07:00
Andrew Meadows
ef465d4443 prevent avatar from recentering below ground 2016-10-11 16:37:29 -07:00
Anthony J. Thibault
b0c7564b60 Fix for debug assert in glm::lerp() 2016-10-05 18:06:49 -07:00
Anthony J. Thibault
aab974e6ae Merge branch 'master' into out-of-body-experience 2016-10-04 11:17:52 -07:00
Anthony J. Thibault
dcd425a165 Add an entityTree lock around the AvatarHoldAction::lateAvatarUpdate calls 2016-10-04 10:56:44 -07:00
Anthony J. Thibault
327fcc970b Remove frame lag from near grabbed physical objects.
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.
2016-10-03 16:01:54 -07:00
Anthony J. Thibault
62dc250237 removed DebugDraw calls 2016-09-27 16:48:15 -07:00
Anthony J. Thibault
961d262df1 Improved body follow behavior
* follow helper lean re-centering / reconciliation now modifies bodySensorMatrix, NOT the character controller.
* The character controller now always follows the bodySensorMatrix (in world space).

This decouples the lean re-centering velocity from the velocity used to move the character controller.
We can now independently tune these things separately.
2016-09-27 16:38:48 -07:00
Anthony J. Thibault
203ff95849 Animation tuning to reduce foot sliding.
* Navigation walk speed has been reduced
* Tuned IdleToWalk timescale and interp time to reduce foot sliding
* Tuned fwd, back and lateral characteristicSpeeds to better match the
  animations.  This reduces foot sliding when moving forward and backward.
* Reduced rig state machine hysteresis to 1/60th of a second.
2016-09-26 09:59:50 -07:00
Anthony Thibault
27e6c0f872 Added debug draw path trace for left and right feet 2016-09-24 13:01:16 -07:00
Anthony J. Thibault
f4c4b3474b capsule projection and distance tests now work for non-vertical capsules 2016-09-23 16:55:38 -07:00
Anthony J. Thibault
9567ec11af Prevent character from walking when pinned against collision.
This is fixed by using the pre-action velocity from CharacterController, which does not include any motors or follow velocity.
This pre-action velocity reflects the actual rigid body velocity after collision constraints are resolved.

This should prevent the character f
2016-09-23 15:22:52 -07:00
Anthony J. Thibault
b68dbab994 Fix for incorrect hand offset when backing into collision.
We know properly account for the offset of the head due to clamping from a small maxHipsOffset.
This means the hands should look more natural when you are out-of-body and are moving your hand controllers.
2016-09-23 11:47:44 -07:00
Anthony J. Thibault
1f7dc25f12 MyAvatar.addThrust() works again. 2016-09-21 11:48:54 -07:00
Anthony J. Thibault
4c99848f29 disable vertical re-centering behavior 2016-09-20 17:05:01 -07:00
Anthony J. Thibault
4afd60f22a Flying behavior now works again 2016-09-20 16:01:39 -07:00
Andrew Meadows
7258835f3f restore orientation from physics to Avatar 2016-09-20 09:14:11 -07:00
Andrew Meadows
59e6ca8f8d avatar follows HMD using velocity motor 2016-09-20 08:29:55 -07:00
Andrew Meadows
8dd5c9b92b fix kinematic motion for ground and hover 2016-09-20 08:29:55 -07:00
Andrew Meadows
80b970f2d9 adding MyAvatar::_canonicalScale, but not used yet 2016-09-20 08:29:55 -07:00
Andrew Meadows
e6d40e6e4d Merge pull request #8625 from hyperlogic/bug-fix/oobe-desktop-motor-fix
Fixed motor velocity
2016-09-19 17:04:54 -07:00
Anthony J. Thibault
6f0acb3826 Fixed motor velocity in HMD mode 2016-09-19 16:56:36 -07:00
Anthony J. Thibault
a028d3ba58 Remove hacks for debug rendering of IK targets
A AnimContext class was introduced.  This context is passed into every node during evaluation/overlay.
It holds non-animVar "global" data passed from the application.
2016-09-19 15:03:46 -07:00
Andrew Meadows
c77f6a7c16 Merge pull request #8614 from hyperlogic/out-of-body-experience
Turn and drive the HMD with linear velocity
2016-09-16 15:43:29 -07:00
Andrew Meadows
20418d5f58 fix hips sweep test 2016-09-15 18:39:57 -07:00
Anthony J. Thibault
c7caf9fe06 Turn and drive the HMD with linear velocity 2016-09-15 17:08:36 -07:00
Andrew Meadows
83157b573a measure max hips offset and clamp it in IK 2016-09-15 14:55:04 -07:00
Anthony J. Thibault
d51898f60d Merge branch 'out-of-body-experience' of github.com:highfidelity/hifi into out-of-body-experience 2016-09-15 14:23:38 -07:00
Andrew Meadows
821570fa76 fix Windows build and minor format/namechange 2016-09-15 09:32:03 -07:00
Andrew Meadows
f5c5c68937 adding kinematic character controller demo 2016-09-14 11:43:52 -07:00
Anthony J. Thibault
bc130eaf26 ramp support with comfort mode option 2016-09-13 16:26:10 -07:00
Anthony J. Thibault
0fde3a2d76 Fix for TRUNCATE_IK_CAPSULE globals 2016-09-13 10:26:38 -07:00
Anthony J. Thibault
362e185098 Revert "When out-of-body have your avatar face toward your HMD."
This reverts commit ffb1bae1f0.
2016-09-13 09:54:19 -07:00
Andrew Meadows
954d690b8a expose setting avatar collisionless 2016-09-12 16:24:08 -07:00
Anthony J. Thibault
ffb1bae1f0 When out-of-body have your avatar face toward your HMD. 2016-09-12 16:20:13 -07:00
Anthony J. Thibault
baee5180c1 Moved outOfBody detection into MyAvatar::FollowHelper
in preparation for different follow behavior for in-body and out-of-body.
2016-09-12 11:52:27 -07:00
Anthony J. Thibault
5e0c2286ec Use OUTOFBODY_HACK as searchable token 2016-09-12 10:58:06 -07:00
Andrew Meadows
0f248c4540 expose MyAvatar::setSensorToWorldMatrix() 2016-09-09 16:31:36 -07:00
Anthony J. Thibault
7e7803c648 Added developer option to draw IK targets in world. 2016-09-09 12:50:34 -07:00
Andrew Meadows
bc56df0be1 out-of-body with reduced recovery speeds 2016-09-08 14:31:31 -07:00
Seth Alves
dc31525794 remove some left-over code 2016-08-31 16:39:57 -07:00
Seth Alves
78f54a7f33 get rid of some jitter in equipped items. do a better job of deciding when something equipped has been torn-away 2016-08-30 14:39:11 -07:00
Seth Alves
5bda94b2ba use same data as used for drawing show-hand-targets for controller joints in MyAvatar 2016-08-30 12:39:30 -07:00
Seth Alves
9394a25a1c remove some anti-jitter code that was doing more harm than good 2016-08-26 12:47:19 -07:00
Seth Alves
9884426ad8 replace debugging aborts with asserts 2016-08-26 06:13:33 -07:00
Seth Alves
dfae5b64bd attempt to avoid jitter of held entity while walking 2016-08-25 16:42:40 -07:00
Seth Alves
39f52b3682 start on faux avatar joint that represent hand controllers 2016-08-25 10:58:23 -07:00
Anthony J. Thibault
c6ea64926c Sensor space entity support
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.
2016-08-23 10:13:06 -07:00
Brad Davis
a32ab77b7d Address issues with random camera locations caused by bad HMD sensor poses 2016-08-17 15:22:30 -07:00
Atlante45
51b45f8f73 Steam invite are facing the current position 2016-08-08 15:39:25 -07:00
Seth Alves
75f9626c2d if MyAvatar simulation is cut short (due to no skeleton), still update the head position 2016-08-02 11:50:53 -07:00
Brad Hefta-Gaub
41e02276e5 Merge pull request #8297 from hyperlogic/feature/fst-anim-graph-override
Support for animGraphUrl override in FST file.
2016-07-23 13:42:46 -07:00
Anthony Thibault
2429b82b5e Support for animGraphUrl override in FST file. 2016-07-21 17:17:08 -07:00
Anthony J. Thibault
837b19ed1b fix for pushing avatar into floor when exiting away mode.
* 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()
2016-07-19 14:42:24 -07:00
Howard Stearns
81300ec127 turn hud reset behavior on by default 2016-06-18 14:35:37 -07:00
Bradley Austin Davis
175dbb8924 Merge remote-tracking branch 'upstream/master' into vive-ui 2016-06-14 09:48:56 -07:00
Chris Collins
b14f9cd312 Merge pull request #8041 from sethalves/fix-avatar-entity-locking
Fix avatar entity locking
2016-06-13 13:10:32 -07:00
Anthony J. Thibault
ccf85c1f7c Merge branch 'vive-ui' into bug-fix/hmd-ui-center-improvements 2016-06-13 09:48:58 -07:00
Anthony J. Thibault
f6ed5a1dae Bugfixes based on feedback
* 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().
2016-06-10 18:33:40 -07:00
Brad Hefta-Gaub
3c5af56421 Merge pull request #8010 from hyperlogic/feature/hmd-lean-recenter-property
Added MyAvatar.hmdLeanRecenterEnabled property
2016-06-09 12:17:51 -07:00
Anthony J. Thibault
1aae22f5a5 Optimized MyAvatar.getCharacterControllerEnabled()
Instead of doing a blocking queued invokeMethod, it just calls into CharacterController.isEnabled() which is now thread-safe.
2016-06-09 09:35:19 -07:00
Anthony J. Thibault
5ef6847dc3 HMD re-centering while driving improvements.
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.
2016-06-08 18:36:36 -07:00
Seth Alves
f070708b4a _avatarEntityData is accessed by more than one thread. 2016-06-08 15:53:54 -07:00
Anthony J. Thibault
30d8ae36e8 Added MyAvatar.characterControllerEnabled property 2016-06-07 16:55:32 -07:00
Howard Stearns
38d0d28603 Merge pull request #8021 from AndrewMeadows/walk-follows-camera
camera steers avatar when walking
2016-06-07 10:43:01 -07:00
Andrew Meadows
e6844e2468 use world-UP rather than head-UP 2016-06-04 21:11:31 -07:00
Andrew Meadows
49c835b6fc use camera twist for walk steering 2016-06-04 20:53:30 -07:00
Brad Davis
39dcd1f9bd Eliminate file IO contentions for the settings 2016-06-04 17:55:30 -07:00
Anthony J. Thibault
9292a9ce0b Added MyAvatar.hmdLeanRecenterEnabled property
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.
2016-06-03 13:56:32 -07:00