Commit graph

1031 commits

Author SHA1 Message Date
Brad Hefta-Gaub
f90844449d fix angular velocity 2015-10-23 13:16:05 -07:00
Brad Hefta-Gaub
4a58eeb810 expose deltaRotation as part of MyAvatar.xxxHandPose 2015-10-23 12:14:33 -07:00
Brad Hefta-Gaub
71dfff7c35 first cut at adding MyAvatar.xxxHandPose 2015-10-23 12:00:40 -07:00
Brad Davis
afcec347ff Wiring yaw action to avatar 2015-10-21 21:35:19 -07:00
Brad Davis
044a28212d Wiring step yaw to the avatar 2015-10-21 20:44:38 -07:00
Brad Hefta-Gaub
68a2985b7a add tip position as well 2015-10-21 17:14:48 -07:00
Brad Hefta-Gaub
a3900a954b expose MyAvatar.leftHandePosition and MyAvatar.rightHandPosition to JS 2015-10-21 17:03:54 -07:00
Seth Alves
c96f7562f2 Merge branch 'master' of github.com:highfidelity/hifi into groundwork-for-hold-action-changes 2015-10-15 09:28:57 -07:00
Thijs Wenker
8111432088 Merge branch 'master' of https://github.com/worklist/hifi into JS_Rotation_FIX 2015-10-15 14:50:20 +02:00
Seth Alves
698a4001a8 Merge branch 'master' of github.com:highfidelity/hifi into hold-action-changes 2015-10-14 06:18:02 -07:00
Anthony J. Thibault
1c1221597d Merge branch 'master' into tony/turn-hips-while-moving 2015-10-13 18:38:27 -07:00
Anthony J. Thibault
e484a904a2 Rotate the avatar to align with the HMD while moving
MyAvatar: refactored updateFromHMDSensorMatrix() a bit by splitting it into several methods, because
it was getting quite large and becoming hard to follow.

* beginStraighteningLean() - can be called when we would like to trigger a re-centering action.
* shouldBeginStraighteningLean() - contains some of the logic to decide if we should begin a re-centering action.
  for now it encapulates the capsule check.
* processStraighteningLean() - performs the actual re-centering calculation.

New code was added to MyAvatar::updateFromHMDSensorMatrix() to trigger re-centering when the avatar speed rises
over a threshold.

Secondly the Rig::computeMotionAnimationState() state machine for animGraph added a state change hysteresis
of 100ms.  This hysteresis should help smooth over two issues.

1) When the delta position is 0, because the physics timestep was not evaluated.
2) During re-centering due to desired motion, the avatar velocity can fluctuate causing undesired animation state fluctuation.
2015-10-13 17:36:00 -07:00
Andrew Meadows
073b019458 Merge pull request #6072 from howard-stearns/skip-some-reload-recenter-on-startup
Don't reload/recenter some avatar data on startup
2015-10-13 17:08:00 -07:00
Brad Hefta-Gaub
8a2e23cae4 CR feedback 2015-10-13 16:20:52 -07:00
Brad Hefta-Gaub
ad96d76921 implement comfort mode hack 2015-10-13 15:06:11 -07:00
Howard Stearns
93e908a592 Don't reload/recenter some avatar data on startup, when we don't necessarilly have all the required data initialized. 2015-10-13 12:15:13 -07:00
Seth Alves
7c52849740 change how hold action works 2015-10-13 11:36:58 -07:00
Howard Stearns
6cbeb6e7c3 Fix my bug, introduced in PR#6012, in which startup position goto got
cancelled out.
2015-10-12 15:40:16 -07:00
Thijs Wenker
7d3b300037 Fix set avatar rotations from scripts (different tread) 2015-10-11 14:51:12 +02:00
Anthony J. Thibault
0c489e3afd MyAvatar: Rename new instance variable after merge. 2015-10-09 14:46:05 -07:00
Anthony J. Thibault
b5ba621f78 Merge branch 'master' into tony/hmd-rest-detection 2015-10-09 14:36:18 -07:00
Howard Stearns
652376db8a Kill the stuff we can't do yet. 2015-10-08 21:44:45 -07:00
Howard Stearns
bd0d1eaef6 Merge branch 'master' of https://github.com/highfidelity/hifi into align-body-to-head-on-reset 2015-10-07 18:35:52 -07:00
Thijs Wenker
ad5a6fac62 - applying of new qApp accessing method.
- Some magic constant replacements with Helper "glm::vec3(matrix[3])" -> "extractTranslation(matrix)"
2015-10-07 15:10:40 +02:00
Howard Stearns
1fc305ca6b Update HMD-derived avatar stuff during reset, update position under head, and remove unused vars. 2015-10-06 20:51:53 -07:00
Anthony J. Thibault
2dabe69341 When HMD is at rest, re-center the body under the avatar.
This should help the case when a user avatar is stuck in an
uncomfortable pose for a long period of time.  If they stop
moving their head, the body should recenter itself and
appear more natural.

Added an AtRestDetector class.  That tracks the average and variance
of both position and rotation (quaternion logarithms), then
detects when the variance falls under a threshold.

Also, renamed variables with the straighting prefix to straightening.
2015-10-06 20:37:51 -07:00
Brad Davis
028935f831 Removing deprecated function usage 2015-10-06 20:36:55 -07:00
Brad Davis
19fb4e92a6 Enabling programmatic access to the IPD scale
Conflicts:
	interface/src/Application.cpp
	interface/src/avatar/MyAvatar.cpp
	interface/src/scripting/HMDScriptingInterface.cpp
	interface/src/scripting/HMDScriptingInterface.h
2015-10-06 19:08:17 -07:00
Howard Stearns
db955d894f Align avatar body to head on reset. 2015-10-06 14:52:53 -07:00
Atlante45
e9b7125894 Misc cleanup 2015-10-06 13:56:26 -07:00
Atlante45
5e9425d9eb Fix view frustum preference 2015-10-06 13:56:25 -07:00
Atlante45
35e2f8cd89 Removed _myAvatar from Application 2015-10-06 13:56:25 -07:00
Atlante45
34bba28775 More header cleanup 2015-10-06 13:56:22 -07:00
Atlante45
cf3b33a96b Replace Application::getInstance() with qApp 2015-10-06 13:56:19 -07:00
Brad Davis
8090bc8e8d Revert "Enabling programmatic access to the IPD scale" 2015-10-06 10:16:42 -07:00
Brad Davis
725ed26ac2 Enabling programmatic access to the IPD scale 2015-10-04 16:55:49 -07:00
Anthony J. Thibault
fa864d29f9 Merge branch 'master' into transmit-joint-translation 2015-10-01 16:55:24 -07:00
Anthony J. Thibault
d993d39718 Bug fix for deriveBodyFromHMDSensor calculations
The calculation that determined where the body position relative to the HMD
was incorrect, one of the components was in the wrong coordinate frame.

Now use the skeleton's bind pose to compute the proper avatar offsets for the eyes, neck and hips.
Use these offsets to calculate where the hips should be given a specific hmd position and orientation.

Also, added a bug fix for Rig, which would cause a -1 index deference when an avatar was missing
certain named joints, such as, "LeftEye", "Neck" and "Head".
2015-09-30 16:28:33 -07:00
Seth Alves
58d98d3ce4 Merge pull request #5932 from howard-stearns/default-animation-and-quieter
Set default animation and quiet state logging
2015-09-29 16:12:28 -07:00
Seth Alves
d554eb8db9 avatar collisions are off during a grab 2015-09-29 15:09:25 -07:00
Seth Alves
d0a1e206ca Merge branch 'master' of github.com:highfidelity/hifi into transmit-joint-translation 2015-09-29 13:55:13 -07:00
Howard Stearns
745a59af1c Default animation is anim graph.
Remove state change logging from animation graph state machine.
2015-09-29 12:48:57 -07:00
Anthony J. Thibault
c51ce79205 Updated comment on MyAvatar::updateFromHMDSensorMatrix() 2015-09-28 15:30:21 -07:00
Anthony J. Thibault
e32eb38c3b Fix for Oculus timewarp judder introduced by 20d784ba39
Moved myAvatar->updateFromHMDSensorMatrix from Application::update
back into Application::paintGL, so it occurs between
displayPlugin->preRender() and displayPlugin->display().

We should render with the most up-to-date camera position as possible,
and sample it at the same frequency as the display rate.
2015-09-28 14:38:03 -07:00
Seth Alves
50dd8eba45 Relay joint translations across network. Apply animation's root-joint translation to avatar. 2015-09-26 11:40:39 -07:00
Anthony J. Thibault
fc9b270951 Merge branch 'master' into tony/gangsta-lean 2015-09-25 11:36:58 -07:00
Anthony J. Thibault
474c847ef1 Updated constants and units. 2015-09-24 18:00:59 -07:00
Anthony J. Thibault
20d784ba39 Threshold based walking while in HMD.
This is a blend of the previous 'sitting' and 'standing' HMD modes.
Basically, when you move your head within a small range (20cm) your
avatar will lean appropriately, however when you cross that threshold
your body will move underneath you, re-centering your head above the body.

While this occurs the avatar should play the appropriate walking animations.
2015-09-24 17:54:32 -07:00
Howard Stearns
266c69fc70 Disable the old-school Rig::inverseKinematics during reset. 2015-09-24 15:33:52 -07:00
Howard Stearns
426ccabba7 Merge branch 'master' of https://github.com/highfidelity/hifi into apostrophe 2015-09-24 14:19:58 -07:00