Commit graph

1684 commits

Author SHA1 Message Date
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
howard-stearns
9ff1a695f0 Merge branch 'master' of https://github.com/highfidelity/hifi into reset-hud-on-driving 2016-05-26 13:52:23 -07:00
howard-stearns
991da9e248 fix cut-paste error in settings. 2016-05-26 09:51:55 -07:00
howard-stearns
dc7d6d470d Don't reset head when we come back. 2016-05-25 12:21:50 -07:00
howard-stearns
2accccef9e Merge branch 'reset-hud-on-driving' of https://github.com/howard-stearns/hifi into reset-hud-on-driving 2016-05-25 11:32:01 -07:00
howard-stearns
8198a1b4d1 Add preference to control behavior. 2016-05-25 11:30:45 -07:00
howard-stearns
5d806cba7f Merge branch 'master' of https://github.com/highfidelity/hifi into reset-hud-on-driving 2016-05-25 10:47:31 -07:00
Anthony J. Thibault
edfce0d5ba MyAvatar: reset fix, for both oculus and vive 2016-05-23 16:34:19 -07:00
Anthony J. Thibault
a1c32f8c44 Merge branch 'master' into tony/improved-avatar-mixer-precision 2016-05-23 10:24:52 -07:00
Seth Alves
f91a2403be merge from upstream 2016-05-20 17:07:34 -07:00
Howard Stearns
3088a84035 Just bringing the code up to date and forcing a build to see how Jenkins/osx is doing.
Merge branch 'master' of https://github.com/highfidelity/hifi into reset-hud-on-driving
2016-05-20 08:04:38 -07:00
Anthony J. Thibault
7f131e2c4f Reset avatar as well as displayPlugin when "driving" 2016-05-19 15:00:08 -07:00
Seth Alves
74520f5c92 Merge branch 'master' of github.com:highfidelity/hifi into no-fly-zones 2016-05-19 09:49:44 -07:00
Seth Alves
419c744bd4 Merge branch 'master' of github.com:highfidelity/hifi into avatar-entities-3 2016-05-19 09:49:18 -07:00
Anthony J. Thibault
0294066668 Removed pupilData and translationRadix from AvatarData packet. 2016-05-18 16:41:50 -07:00
Andrew Meadows
aa171578b7 remove cruft 2016-05-17 14:58:14 -07:00
Andrew Meadows
c64612c42b namechange keyboardMotor --> actionMotor 2016-05-17 14:46:50 -07:00
Andrew Meadows
e4cb6e2b87 order-independent CharacterController motors 2016-05-17 14:02:49 -07:00
Seth Alves
a0c3224705 Merge branch 'master' of github.com:highfidelity/hifi into no-fly-zones 2016-05-16 10:56:09 -07:00
Seth Alves
3876a8037c Merge branch 'master' of github.com:highfidelity/hifi into avatar-entities-3 2016-05-16 09:51:20 -07:00
Seth Alves
6277bf8603 if avatar is set to the default avatar file that came with the distribution, don't save that url to settings. never send a file url to the avatar-mixer. 2016-05-13 16:37:43 -07:00
Seth Alves
c9c619916c Merge branch 'master' of github.com:highfidelity/hifi into no-fly-zones 2016-05-11 19:37:57 -07:00
Seth Alves
fcd2e45d67 merge from upstream 2016-05-11 18:45:32 -07:00
Seth Alves
ac506dc4b7 where needed, copy clientOnly into properties before calling queueEditEntityMessage 2016-05-11 12:46:16 -07:00
Seth Alves
872f1b0c64 clear avatarEntity data for entities that are deleted 2016-05-10 17:48:55 -07:00
Anthony J. Thibault
80a349c65b Merge branch 'master' into tony/improved-avatar-debug-draw 2016-05-10 14:50:13 -07:00
Seth Alves
4c1f815870 Merge branch 'master' of github.com:highfidelity/hifi into avatar-entities-3 2016-05-10 10:09:40 -07:00
Brad Hefta-Gaub
d7eee98acc Merge pull request #7827 from AndrewMeadows/threadsafe-viewfrustum
resurrection of threadsafe ViewFrustum
2016-05-10 09:06:38 -07:00
Anthony J. Thibault
641e152699 Eye tracking bug fix and debug rendering improvement
* Bug fix for eye tracking in HMD, the "up" orientation of your eyes now match your head.
* DebugDraw: added drawRay method.
* Application: Renamed preRender to postUpdate
* AvatarManager: added postUpdate method that iterates over all avatars.
* MyAvatar: Renamed preRender to preDisplaySide
* MyAvatar: split preRender code into postUpdate and preDisplaySide.
* Removed "Show who is looking at me", "Render focus indicator" and "Render lookat target" debug draw.
* Split "Show Look At Vectors" into "Show My Look At Vectors" and "Show Other Look At Vectors", to make it easier to debug eye tracking.
* "Show Look at Vectors" now draws the right eye red and the left eye blue.
* Removed Avatar and MyAvatar renderBody
* Removed look at rendering from head.
* GLMHelpers: Bugfix for generateBasisVectors when up primary and secondary axis were orthogonal
2016-05-08 16:20:32 -07:00
Seth Alves
0e6d9a1eec avatar mixer can relay "client-only" entities between interfaces -- the entity server wont know about them. 2016-05-07 14:48:31 -07:00
Andrew Meadows
7d6424bdcc Head::render() was cruft 2016-05-05 18:28:27 -07:00
Andrew Meadows
71b2d647e8 add locks and explicitly copy ViewFrustums 2016-05-05 18:28:27 -07:00
Andrew Meadows
bcf2cc8074 use references not pointers for ViewFrustums
also unravelling some spaghetti:
(1) split Octree stuff out of ViewFrustum
(2) moved ViewFrustum from octree to shared lib
(3) removed some cruft
2016-05-05 18:28:27 -07:00
Atlante45
07adef9465 Fix entities collision sounds 2016-05-05 14:55:28 -07:00
Atlante45
96ee33e80e Fix avatars collision sounds 2016-05-05 14:55:28 -07:00
Brad Hefta-Gaub
49d02b802a Merge pull request #7719 from zzmp/feat/resource-prefetch
Add prefetching to exposed caches
2016-05-02 18:04:26 -07:00
Seth Alves
4feb2944ed hook up zone's ghostingAllowed flag 2016-05-01 15:27:49 -07:00
Seth Alves
ef85cc7803 hook up zone flyingAllowed flag to character controller 2016-05-01 14:47:12 -07:00
Andrew Meadows
8a691cf449 Merge pull request #7765 from hyperlogic/tony/cone-sphere-angle
Improve eye tracking when face to face
2016-04-27 16:54:07 -07:00
Zach Pomerantz
bc8a171fde Merge branch 'master' of github.com:highfidelity/hifi into feat/resource-prefetch 2016-04-27 11:55:24 -07:00
Anthony J. Thibault
71f67c99cc MyAvatar: use coneSphereAngle for eyeTracking look at targets 2016-04-26 13:43:03 -07:00
Anthony J. Thibault
b7f157f4ff Reset avatar on exit of away-mode.
Exposed MyAvatar.reset(bool) to script.
away.js now calls this on exit of away-mode.
2016-04-25 14:10:20 -07:00
Anthony J. Thibault
0c200e8c00 MyAvatar: coding convention fix for updateEyeContactTarget() 2016-04-25 09:27:43 -07:00
Anthony Thibault
0da3fb8eee Eye contact improvements
* After eyes change targets there is now a minimum 1/3rd second delay before they will again.
* Changing gaze from eye to mouth is less likely then switching between eyes.
2016-04-24 18:50:14 -07:00
Brad Hefta-Gaub
79a1e6264e Merge pull request #7714 from hyperlogic/tony/default-anims-are-local
Avatar animations are now stored locally
2016-04-22 13:44:30 -07:00
Zach Pomerantz
e3131d2098 Rm prefetchAnimation from avatar/rig 2016-04-20 20:14:15 -07:00
Anthony J. Thibault
8e5785cdf8 Avatar animations are now stored locally
Improves FTUE, by no longer going over the network to download default avatar animations.
This also includes support for relative animation urls within the animation.json
2016-04-19 16:11:14 -07:00
Zach Pomerantz
fc61f85bf9 Merge pull request #7698 from hyperlogic/tony/avatar-on-load-complete-callback
Added MyAvatar onLoadComplete Callback
2016-04-19 10:36:20 -07:00
Brad Hefta-Gaub
8eff47f922 Merge pull request #7705 from hyperlogic/tony/avatar-attachment-lag-fix
Fix for laggy avatar attachments
2016-04-19 07:15:38 -07:00
Anthony J. Thibault
279e77f523 updated comment 2016-04-18 15:18:08 -07:00
Anthony J. Thibault
544928b46e MyAvatar: fix for laggy avatar attachments 2016-04-18 14:51:33 -07:00
Anthony J. Thibault
dc92ccc2b2 MyAvatar: Removed unnecessary slot. 2016-04-18 13:19:49 -07:00
Anthony J. Thibault
1682598be7 Added onLoadComplete signal to MyAvatar
This can be used in javaScript to detect when the model has finished loading because the url has changed or the model has been reset.
2016-04-18 11:37:02 -07:00
Brad Davis
f3e5306f90 Working on an automated performance test 2016-04-17 10:20:00 -07:00
Anthony J. Thibault
93a5bdd79a Prevent avatar rotation due to HMD head turning in third-person camera.
Also, fix one frame glitch during snap turning, by updating the sensorToWorld matrix
after the MyAvatar::updateOrientation rotates the avatar, but before we perform IK.
2016-04-08 15:27:43 -07:00
Seth Alves
537c6fa3c6 fix indentation 2016-03-29 15:39:42 -07:00
Seth Alves
9d8e01f2a5 lock entity-tree before moving entity-children of avatars 2016-03-29 15:01:23 -07:00
Zach Pomerantz
c5e5195db1 Merge branch 'master' of github.com:highfidelity/hifi into feat/geocaching 2016-03-25 12:07:00 -07:00
Anthony J. Thibault
6a5a443eff Avatar: Eye-tracking works again
This replaces the calculation of the Head left and right eye positions used for eye tracking.
Which was inadvertently removed in this commit 7483b8546b
2016-03-24 18:07:46 -07:00
Zach Pomerantz
3e9e083df5 Update users of NetworkGeometry 2016-03-24 11:35:41 -07:00
Anthony J. Thibault
df187499ff MyAvatar: fix jitter in hands when moving
Store hand controller positions within the avatar in sensor space, not world space.
Before IK the sensorToWorld matrix is updated to reflect the world space motion of the
character controller during physics.  This ensures the IK hand targets move properly with the character.
2016-03-22 19:19:52 -07:00
Anthony J. Thibault
7cab8f63fb Merge branch 'master' of github.com:highfidelity/hifi into tony/no-locks-no-problem 2016-03-21 16:03:33 -07:00
Anthony J. Thibault
ce47f83288 Prevent deadlock if idle is called during rendering
This extraordinary event can occur if a MessageBox is popped up by the opengl driver.

* removed AvatarData::avatarLock
* removed AvatarUpdate

This code was left over from an earlier avatar threading experiment.

Removed AvatarData avatarLock and AvatarUpdate class
2016-03-21 15:11:15 -07:00
Andrew Meadows
0a00436700 Merge pull request #7411 from ZappoMan/fixBlenderCrashRedux
Fix blender crash redux
2016-03-21 15:04:22 -07:00
Brad Hefta-Gaub
492e71345a Revert "Revert "Fix ModelBlender crash""
This reverts commit f274cdcc7f.
2016-03-21 11:42:25 -07:00
Brad Hefta-Gaub
f274cdcc7f Revert "Fix ModelBlender crash" 2016-03-21 10:47:31 -07:00
Anthony J. Thibault
d218ca4960 openvr: fix for crash on exit
Before this fix, a script could call into HMD.getHUDLookAtPosition2D() while the app was shutting down, which in turn would call
getHeadPose() on the currently active display plugin.  This call could cause a crash within the openvr plugin, because the SDK was either shutdown, or in the process of shutting down on the main thread.

This fixes this by spliting the previous DisplayPlugin::getHeadPose(int) into two parts:

* updateHeadPose(int) which is only called once a frame and only by the main thread.
* getHeadPose() which is thread-safe and will return a cached copy of the hmd pose sampled by the last updateHeadPose.
2016-03-18 12:26:11 -07:00
Brad Hefta-Gaub
917c4644a5 make SkeletonModel be shared_ptr friendly as well 2016-03-17 18:03:49 -07:00
Brad Hefta-Gaub
7483b8546b remove FaceModel, make Model support shared_from_this() so we can ave shared and weak pointers to it 2016-03-17 17:05:35 -07:00
Brad Hefta-Gaub
11e88f965d Merge pull request #7347 from hyperlogic/tony/prevent-roll-in-goto-location
MyAvatar: prevent roll and pitch in avatar via snapshot url.
2016-03-14 18:58:49 -07:00
Anthony Thibault
1e94d9bdf5 interface/src/avatar: cppcheck fixes 2016-03-13 18:56:15 -07:00
Anthony Thibault
b921ac7757 MyAvatar: prevent roll and pitch in avatar via snapshot url. 2016-03-13 11:32:48 -07:00
Anthony Thibault
ab390f7d2e Merge branch 'master' into tony/smooth-hands 2016-03-11 10:06:31 -08:00
Anthony J. Thibault
5eeb4ca594 Fix one frame lag controller lag/jitter
Move userInputMapper->update() after inputPlugin->pluginUpdate().
2016-03-11 09:28:25 -08:00
Anthony J. Thibault
ab19d3e5a2 Moved animation after physics, hand poses are in world frame.
There are still some debug hacks enabled so I can test in the vive room.
2016-03-10 20:44:35 -08:00
Anthony J. Thibault
807d31743c Removed Hand, HandData & PalmData
Instead, we just store two controller::Poses in MyAvatar.
Existing behavior and scripting APIs have been preserved.

The hand controller debug drawing is slightly different, but still works.
2016-03-10 19:33:31 -08:00
Anthony J. Thibault
886457939d Merge branch 'master' into tony/wrong-way-overlay 2016-03-09 16:50:18 -08:00
Anthony Thibault
5df616be37 OpenVR: More usable UI Sphere overlay location
Also, added a debug option to display SensorToWorld matrix in Developer > Avatar menu.
2016-03-09 16:24:08 -08:00
Anthony J. Thibault
0d62b10a8f Added Mat4 support to script
Also, hooked up MyAvatar.sensorToWorldMatrix access to script.
2016-03-07 16:16:14 -08:00
Philip Rosedale
7c765f3d5a Merge pull request #7258 from hyperlogic/tony/better-lean-detection
MyAvatar: use a box instead of a sphere for horizontal re-centering
2016-03-07 15:05:10 -08:00
Chris Collins
7850ca3576 Merge pull request #7227 from hyperlogic/tony/eye-look-at-fixes
Avatar eye look at fixes for HMD and desktop
2016-03-07 11:50:16 -08:00
Anthony Thibault
2cbb41fd38 MyAvatar: bug fix for forward/backward lean detection 2016-03-07 10:11:22 -08:00
Anthony J. Thibault
aefeff2493 MyAvatar: Use a box instead of a sphere for horizontal re-centering 2016-03-07 09:50:38 -08:00
Anthony Thibault
0de19d13c4 MyAvatar: open up horizontal leaning threshold 2016-03-04 15:28:38 -08:00
Anthony Thibault
37ba0ecd9f MyAvatar: prevent face from being visible when crouching
Overall, this should fix many of the issues with the head being visible when it shouldn't.
2016-03-04 11:48:55 -08:00
Anthony J. Thibault
dc456cbdbe MyAvatar: dropped vertical recenter limit. 2016-03-04 11:15:11 -08:00
Anthony J. Thibault
6e80665107 MyAvatar: reduced rotation re-center threshold to 30 degrees
Also, warning fix for Linux.
2016-03-01 17:45:16 -08:00
Anthony J. Thibault
2dfc517d14 MyAvatar: re-center vertically, on x & z drive keys 2016-03-01 16:45:36 -08:00
Anthony J. Thibault
be446f4e96 MyAvatar: separate rotation, horizontal and vertical HMD follow 2016-03-01 15:38:02 -08:00
Anthony J. Thibault
506e46faee MyAvatar: fix for missing include 2016-03-01 11:21:14 -08:00
Anthony J. Thibault
babf48ac57 MyAvatar: take IPD scale into account when computing corrected eye lookAt 2016-03-01 11:17:03 -08:00
Anthony J. Thibault
3cde972174 Rig: issue warnings for missing joints
Also, Removed Rig::computeEyesInRigFrame, it was causing warnings because it was looking up
Eye and Head joints for all models, not just avatars.
2016-03-01 11:07:22 -08:00
Anthony J. Thibault
99bd0f3d13 MyAvatar: fixes for eye look at
Users in desktop mode should now see the eyes change focus between the left eye, right eye and the mouth.
Users in mirror mode, or third person camera, should more accurately determine which avatar to look at.
2016-02-29 16:49:35 -08:00
howard-stearns
d8fe55ddc5 Proper default for snapTurn preference (and new name so as to update old
users).
2016-02-25 13:06:34 -08:00
Zach Pomerantz
3c4ab077be Init validOrientation for myAvatar calc 2016-02-24 13:16:45 -08:00
Brad Hefta-Gaub
2a18127a01 Merge pull request #7171 from jherico/avatar_qml_location
Allow avatar positioning from QML
2016-02-24 11:37:12 -08:00
Anthony J. Thibault
8f27424de7 MyAvatar: bug fix for avatar leaning 2016-02-23 14:30:51 -08:00
Brad Davis
2258a9cad9 Allow avatar positioning from QML 2016-02-23 12:16:41 -08:00
howard-stearns
20406a5a14 Remove comfortMode menu item, but add a Settings for snapTurn within MyAvatar. 2016-02-15 13:26:40 -08:00
Anthony J. Thibault
111ed65bf8 Controller Pose values are relative to Avatar.
Pass a InputCalibrationData to each inputPlugin and inputDevice.
This contains the most up sensorToWorldMatrix, avatarMat and hmdSensorMatrix.
Each input plugin can use this data to transform it's poses into Avatar space
before sending it up the chain.

This fixes a bug in the handControllerGrab.js script that relied on the hand controller
rotation/positions being in the avatar frame.
2016-02-11 17:18:01 -08:00
Seth Alves
43592fd699 Merge pull request #7048 from hyperlogic/tony/avatar-on-moving-platform
Better avatar animation when attached to a moving entity
2016-02-09 14:30:02 -08:00
Anthony J. Thibault
2b10fea006 SpatiallyNestable: warn on failure. 2016-02-09 14:03:39 -08:00
Anthony J. Thibault
072172b1a2 SpatiallyNestable: now with velocity support!
Moved velocity and angularVelocity into the SpatiallyNestable base class.

Entity velocity and angularVelocity properties are now relative to their parent, similar to the way position and orientation work for entities.

MyAvatar rig animations now use SpatiallyNestable to convert velocity into local frame to drive the animation state machine.
2016-02-08 19:43:23 -08:00
Seth Alves
d5f3447fbc when updating queryAACubes for children, use the lastEdited from the parent's properties 2016-02-08 16:22:41 -08:00
Anthony J. Thibault
97bcc54360 CharacterController: separate target velocity from parent velocity.
Also, disable damping on the rigidBody used by the CharacterController.
2016-02-08 16:01:36 -08:00
Seth Alves
7f2b822796 only setLastEdited on properties to be sent 2016-02-08 15:15:49 -08:00
Seth Alves
3030944ca1 set last-edited when updating a child's queryAACube 2016-02-08 15:09:11 -08:00
Anthony Thibault
c4f9a4805c MyAvatar: moving platform support
* pass sum of desired and parent velocity onto avatar's character controller.
* pass local position and velocity to Rig for animation purposes.
2016-02-07 14:07:40 -08:00
Babiuch, Ryan Nicholas
aab98db812 Merge branch 'master' of github.com:highfidelity/hifi 2016-02-05 12:49:38 -06:00
Babiuch, Ryan Nicholas
dca7ff967c Conform to coding standard. 2016-02-04 08:26:56 -06:00
Anthony J. Thibault
d2068678f4 MyAvatar: bumped up size of head, w.r.t. head cauterization.
This is to avoid some issues where face is visible when looking straight down.
Specifically, with the Albert avatar.
2016-02-03 16:08:11 -08:00
Anthony J. Thibault
027a2166f5 MyAvatar: Use head to turn while flying in HMD mode 2016-02-03 15:44:06 -08:00
Babiuch, Ryan Nicholas
d7951f4300 Merge branch 'master' of github.com:highfidelity/hifi 2016-02-03 14:52:08 -06:00
Babiuch, Ryan Nicholas
3d727d76c2 Merge branch 'master' of github.com:highfidelity/hifi 2016-02-03 13:39:13 -06:00
Anthony J. Thibault
6cc3b2b47f Fixed unused variable warnings on OSX and Linux 2016-02-02 15:04:28 -08:00
Anthony J. Thibault
c4e1509aa2 CharacterController: better debug support of internal state machine
Head is no longer visible when flying fast, in first-person HMD mode.
2016-02-02 11:26:18 -08:00
Anthony J. Thibault
61c55ebf6c Updated character controller with a state enumeration
Also, adjusted checkForSupport logic such that very slanted walls are not considered support.
2016-02-02 11:26:15 -08:00
Andrew Meadows
e394f64540 Merge pull request #6991 from seefo/master
Added camera sensitivity dialog preferences
2016-02-02 08:22:45 -08:00
Brad Hefta-Gaub
711787a997 Merge pull request #6981 from howard-stearns/animate-iff-visible-with-step2-billboard-removal
Animate iff visible with step2 billboard removal
2016-02-01 13:54:25 -08:00
Babiuch, Ryan Nicholas
47f7d55e2c Working energy usage for entity manipulation.
- Working example in examples/example/ui/MyEnergyBar.js
2016-02-01 08:32:52 -06:00
Seefo
07043d537f Fixed Ubuntu warnings 2016-01-29 21:11:44 -05:00
Seefo
77050b13dc Adjusted default pitch/yaw speed 2016-01-29 19:41:34 -05:00
Seefo
ffa6687af3 Added setting dialogs for camera pitch and yaw 2016-01-29 19:34:57 -05:00
David Rowe
e07baf916b Fixed a typo noticed in passing 2016-01-30 12:30:21 +13:00
David Rowe
d2cdbebc94 Store avatar location after a teleport 2016-01-30 12:26:50 +13:00
howard-stearns
9601b65269 Merge branch 'master' of https://github.com/highfidelity/hifi into animate-iff-visible 2016-01-29 11:40:13 -08:00
howard-stearns
1225e50581 One round of billboard shredding. Server/wire/AvatarData have not been
touched.
2016-01-27 16:15:43 -08:00
Andrew Meadows
7b5c221ceb Merge pull request #6956 from hyperlogic/tony/velocity-fix
MyAvatar: copy body velocity + hmd follow velocity onto avatar
2016-01-27 14:59:46 -08:00
James B. Pollack
86b2a67f72 Merge pull request #6891 from sethalves/avatar-updates-query-cube
Avatar updates query cube
2016-01-27 13:04:03 -08:00
Anthony J. Thibault
c771c925c8 MyAvatar: copy body velocity + hmd follow velocity onto avatar
This was inadvertently removed in a previous PR.

https://github.com/highfidelity/hifi/pull/6895

Also, renamed Velocity stat to Speed.
2016-01-27 11:20:32 -08:00
Seth Alves
1cc0aa18bb Merge branch 'master' of github.com:highfidelity/hifi into avatar-updates-query-cube 2016-01-26 13:31:07 -08:00
Seth Alves
1fefe0fa0e when an avatar moves a child entity around, it has to invoke MovingEntitiesOperator to keep the local octree up-to-date 2016-01-26 13:30:55 -08:00
Anthony J. Thibault
3cee3cbb5a Avatar Developer Menu: added animation debug options
This options are for for developers only and might help debug animation related issues.

* Enable Inverse Kinematics: this can be toggled to disable IK for the avatar.
* Enable Anim Pre and Post Rotations: this option can be used to use FBX pre-rotations from source avatar animations, instead of the current default, which is to use them from the source model.
  This only effects FBX files loaded by the animation system, it does not affect changing model orientations via JavaScript.
2016-01-25 18:52:13 -08:00
Brad Hefta-Gaub
0c64d45c18 Merge pull request #6909 from hyperlogic/tony/fly
MyAvatar: fly animation
2016-01-22 17:04:53 -08:00
Anthony J. Thibault
7af20e90c8 Hooked up fly animation to json and Rig 2016-01-22 13:47:09 -08:00
Anthony J. Thibault
8bfa80d5fc Merge remote-tracking branch 'upstream/master' into tony/hmd-recenter-on-rotation 2016-01-22 13:37:43 -08:00
Anthony J. Thibault
61b760038a Address feedback from code review 2016-01-22 11:54:28 -08:00
Seth Alves
b6af8ee0cc Merge branch 'master' of github.com:highfidelity/hifi into avatar-updates-query-cube 2016-01-22 11:46:17 -08:00
Anthony J. Thibault
a91c181a89 MyAvatar: Recenter when the head turns away from the hips
Compute HMD facing moving average.
When the moving average diverges from the hips by more then 45 degrees, recenter the body.

Also, the follow code has been changed, instead of a follow velocity being passed to the CharacterController
a desired target is passed.  The CharacterController homes toward it's target based on the time remaining.
Any follow deltas applied to move the avatar's position closer to it's target is stored and re-applied
to the bodySensorMatrix.  This centralizes the moving/homing code to one place, the CharacterContoller.

A new FollowHelper class was also introduced, it groups together the data and logic necessary to perform the
re-centering/follow procedure.  This "hopefully" makes it easier to maintain.
2016-01-21 16:38:42 -08:00
Seth Alves
2e1727610e MyAvatar updates the entity-server about queryAACubes of children entities 2016-01-21 15:52:59 -08:00
Brad Davis
b8109af196 Ignite the atmosphere 2016-01-21 15:15:15 -08:00
Brad Hefta-Gaub
6b76cf484d fix issues with HMD lookout 2D, and cleanup 2016-01-14 08:48:55 -08:00
Anthony J. Thibault
031f59b7b5 Support for adding soft attachments from script.
Also, bug fixes for setting MyAvatar.attachmentData property.
2016-01-07 16:12:36 -08:00
Andrew Meadows
b8b113844f reduced avatar max fly speed from 300 to 30 2016-01-06 11:22:58 -08:00
Anthony J. Thibault
9ea6079c64 Merge branch 'master' into tony/get-palm-thread-safe 2016-01-05 10:16:52 -08:00
Anthony J. Thibault
e7f3f549a5 Avatar getPalm* methods are thread-safe and non-blocking
Uses newly added ThreadSafeValue template class.
2015-12-29 15:10:38 -08:00
Anthony J. Thibault
c2dd00375d Merge branch 'master' into tony/soft-attachments 2015-12-29 13:21:37 -08:00
Anthony J. Thibault
1618e0a92f Network, Preferences and UI support for soft attachments
Added an isSoft field to the AttachmentData which is edited
by the Attachment Dialog Menu, sent over the network via
AvatarData identity packets and saved in the Interface.ini preferences.

AvatarData and AvatarBulkData version number has been bumped.

Changed Avatar attachment collections to use smart pointers to models
instead of raw ones.  Removed _unusedAttachmentModels.
I don't think the caching was worth the added code complexity.
2015-12-18 13:32:09 -08:00
Andrew Meadows
d6541e9ee7 angular velocity is a vector, not a quaternion 2015-12-18 11:06:58 -08:00
Andrew Meadows
0e1e5db7eb only need one animateScaleChanges() implementation 2015-12-15 18:18:08 -08:00
Andrew Meadows
cd1e3810ca set the scale of avatar on login, don't animate 2015-12-15 18:18:08 -08:00
Andrew Meadows
e9f52b1211 properly scale avatar collision shape 2015-12-15 18:18:08 -08:00
Brad Hefta-Gaub
7d43504c0c Merge pull request #6615 from hyperlogic/tony/js-avatar-default-pose
Expose Avatar default pose to JavaScript
2015-12-15 14:27:53 -08:00
samcake
571ccb3c20 cleaning up the code 2015-12-14 17:14:45 -08:00
samcake
ed2d45d0b6 HMD Mirror looks correct 2015-12-14 16:18:44 -08:00
Anthony J. Thibault
3f0cdb3c02 Merge branch 'master' into tony/js-avatar-default-pose 2015-12-14 11:19:24 -08:00
samcake
2aad26154e THis should fix the mirror and the skybox issue 2015-12-14 10:24:51 -08:00
samcake
1ddbc15df4 Exploring how to solve the mirror fullscreen bug 2015-12-11 17:47:33 -08:00
Brad Hefta-Gaub
a1a3c4470c reload own avatar on Content Reload 2015-12-11 11:02:16 -08:00
Anthony J. Thibault
652ce5501f Expose Avatar default pose to JavaScript
New JavaScript API to get the avatar's default pose.

   MyAvatar.getDefaultJointRotation(index);
   MyAvatar.getDefaultJointTranslation(index);

See `examples/tPose.js` for example usage
2015-12-10 13:57:31 -08:00
Seth Alves
8ca6c7acc3 Merge pull request #6611 from Atlante45/attachments
Fix Attachments jitter
2015-12-10 11:46:19 -08:00
Atlante45
739e184b52 Fix attachments jitter 2015-12-10 11:19:11 -08:00
Andrew Meadows
8c109fd623 move raw bullet code from interface to physics lib 2015-12-08 17:21:43 -08:00
Leonardo Murillo
25494ec867 Merge pull request #6562 from Atlante45/baseball
Baseball
2015-12-07 14:11:21 -08:00
Anthony J. Thibault
fd4ed29405 MyAvatar.clearJointData bug fix
MyAvatar.setJointRotation() now works properly after MyAvatar.clearJointData()
2015-12-07 09:03:40 -08:00
Atlante45
1d498af76e Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-12-04 15:18:25 -08:00
Brad Hefta-Gaub
f71d2d00d2 Merge pull request #6548 from jherico/threaded_present
Threaded present
2015-12-04 13:42:09 -08:00
Howard Stearns
a0a4f7d177 Merge branch 'master' of https://github.com/highfidelity/hifi into fix-anim-graph-preference-change 2015-12-04 11:08:44 -08:00
Brad Davis
b9ace94ff1 Prototyping threaded present 2015-12-04 10:28:16 -08:00
Howard Stearns
187c213f41 reset skeleton 2015-12-03 16:42:57 -08:00
howard-stearns
1b42c5a172 Make MyAvatar.get/setAnimGraphUrl take a url(!), and make setting it
actually do something.
2015-12-03 16:16:01 -08:00
Seth Alves
6eae98fb28 merge from upstream 2015-12-02 14:38:26 -08:00
Anthony J. Thibault
0b05a341a8 MyAvatar::reset() improvements
Body should not orient under the HMD body without changing the HMD view point.
It's more predictable and less likely to make you sick.
It also should reset the height of the character to cancel out squatting, if the HMD position is low.
2015-12-02 10:18:02 -08:00
Anthony J. Thibault
99065f10fa Avatar Warning fixes on linux 2015-12-01 18:12:01 -08:00
Atlante45
083205916f Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-30 18:25:53 -08:00
Seth Alves
b7ebe5b92b merge from upstream 2015-11-30 16:59:52 -08:00
Stephen Birarda
4573e5c59e resolve conflicts on merge with upstream/master 2015-11-30 13:32:38 -08:00
Seth Alves
ca75802b9c unmangle merge 2015-11-26 06:43:28 -08:00
Anthony J. Thibault
549a8f7130 Fix for avatars with no eyes
For example:

https://hifi-public.s3.amazonaws.com/ozan/avatars/hifi_team/howard/howard.fst
https://hifi-public.s3.amazonaws.com/ozan/avatars/hifi_team/tony/tony.fst
2015-11-25 17:24:55 -08:00
Anthony J. Thibault
868cf83b48 Fix for attachments and MyAvatar::getDefaultEyePosition() 2015-11-25 10:07:29 -08:00
Anthony J. Thibault
f120e10ff4 Merge branch 'master' into tony/remove-joint-states 2015-11-24 15:00:05 -08:00
Brad Davis
5c2b980a45 Fixing avatar facial blendshapes and attachments in recordings 2015-11-23 22:36:07 -08:00
Anthony J. Thibault
14189ac909 Move Y_180 flip rotation out of Rig
This Y_180 flip is defined in skeletonModel not in the rig.
This is important if we wish to use the Rig for both Avatars (180 flip) and Entity models (no 180 flip).

We can hide this 180 flip from script, if we wish, by including it in all the accessors to and from
MyAvatar -> skeletalModel -> Rig.

Added Quaternions::Y_180 to GLMHelpers.
2015-11-23 19:31:27 -08:00
Seth Alves
ba30e01664 include global position in avatar-mixer protocol so server knows where avatars are in world-space 2015-11-23 14:12:49 -08:00
Brad Davis
64ba5b4f14 Cleaning up old recording files 2015-11-23 09:42:34 -08:00
Anthony J. Thibault
821264a031 Merge branch 'master' of github.com:highfidelity/hifi into tony/remove-joint-states 2015-11-22 16:15:03 -08:00
Anthony J. Thibault
fe683edb66 Avatar Debug Draw Default Pose now works 2015-11-21 10:53:24 -08:00
Anthony J. Thibault
6cfd831a5a Menu: Added Developer > Avatar > Debug Draw Position
Also renamed "Debug Draw Bind Pose" to "Debug Draw Default Pose"
2015-11-21 09:50:56 -08:00
Seth Alves
f013f95e9b merge from upstream 2015-11-21 08:43:00 -08:00
Anthony J. Thibault
54408a9c87 AnimVars are now in avatar/rig space
This makes it much simpler for code out side of the rig to manipulate AnimVars

* Removed mat4 type from AnimVars
* AnimVariantMap now has a _rigToGeometryTransform matrix
  used to transform positions and rotations into the correct coordinate frame.
* Moved AnimPose code to extract a quat from a scaled matrix into GLMHelpers
2015-11-20 18:29:17 -08:00
Anthony J. Thibault
30087ef0bd Removed dead code 2015-11-20 14:37:53 -08:00
Anthony J. Thibault
a77ea8da43 Removed JointStates! You won't be missed. 2015-11-20 14:15:37 -08:00
Clément Brisset
f4b0492b33 Merge pull request #6436 from birarda/ghost-avatar
fix for ghosted avatars thanks to check/add race
2015-11-20 11:41:20 -08:00
Anthony J. Thibault
a4116e633a Removed last consumer of JointState class
Removed option to render IK constraints used by old animation system
2015-11-20 11:26:54 -08:00
Anthony J. Thibault
ad4b8e0001 Avatar transmission fixes, moved JointData into shared
* Moved JointData into shared library
* added methods to the rig to copy into and out of JointData
* JointData translations must be in meters this is so the
  fixed point compression wont overflow, also, it's a
  consistent wire format.
2015-11-20 10:24:24 -08:00
Stephen Birarda
22f5d4df6d change signature of copy return 2015-11-19 16:25:33 -08:00
Stephen Birarda
6398a922c6 leverage COW for AvatarHash 2015-11-19 15:43:29 -08:00
Anthony J. Thibault
982e2c06a9 Rig: Switched over to use AnimPoses instead of JointStates
* fixed debug rendering
* improved jointState/animPose diff detection code.
2015-11-19 12:14:04 -08:00
U-GAPOS\andrew
b7f501c0b3 use glm::quat_cast instead of extractRotation() 2015-11-19 10:42:53 -08:00
Anthony J. Thibault
721da29432 WIP checkpoint
* No longer normalizing scale in AnimSkeleton and AnimClip
  This means graph is animating in 'geometry' coordinates
  before unit scale is even applied.  This is necessary to
  properly work with both Avatar based models and ModelEntity
  based models

Many things are broken.
  * debug rendering (translations are x100)
  * IK hand targets
  * follow cam
  * I did not even dare to try HMD mode
2015-11-18 18:47:33 -08:00
Brad Davis
5b8047ded4 Make recording and playback work in interface, playback in agent 2015-11-18 14:04:45 -08:00
Anthony J. Thibault
b481d7c73d Merge branch 'master' into tony/remove-joint-states 2015-11-18 09:38:21 -08:00
Anthony J. Thibault
e93b5c5838 Bug fixes for avatars with no eyes
Changed default eye position to 1.9 meters because
the hifi_team avatars are 2.0 meters tall.

Also, prevent array access with negative indices when eye bones are missing.

ಠ_ಠ
2015-11-17 14:02:27 -08:00
Brad Davis
cb26fc67fc Move recording interface back to float/seconds 2015-11-16 14:44:22 -08:00
Howard Stearns
35f7a1cf10 Merge pull request #6391 from AndrewMeadows/sisyphus7
simplify MyAvatar::deriveBodyFromHMDSensor() take 2
2015-11-16 13:55:22 -08:00
U-GAPOS\andrew
df05a9c8aa fix bug: bodySensorMatrix constantly reset when walking 2015-11-16 12:02:16 -08:00
Seth Alves
36af315e5d Merge pull request #6383 from birarda/goodbye-packet
send a hopeful disconnect packet from ACs and Interface
2015-11-16 11:28:48 -08:00
Anthony J. Thibault
55adedcec8 Merge branch 'master' into tony/remove-joint-states 2015-11-16 11:22:44 -08:00
U-GAPOS\andrew
049fe4abee minor cleanup 2015-11-13 17:42:12 -08:00
samcake
8c21ac144e Fixing review comments 2015-11-13 16:45:19 -08:00
U-GAPOS\andrew
6733767d8b use animation state to compute bodyInSensorFrame 2015-11-13 16:39:40 -08:00
Stephen Birarda
e263453acb Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-13 14:48:26 -08:00
U-GAPOS\andrew
91bc7ca062 cleanup start/stop logic for HMD follow 2015-11-13 14:04:36 -08:00
Stephen Birarda
d932ba74fd remove the avatar kill packet from Interface 2015-11-12 17:58:12 -08:00
samcake
1fd37b51a2 trying to get somewhere.... 2015-11-12 17:54:35 -08:00
Brad Davis
ee1545f649 Cleaning up clip and transform 2015-11-12 11:48:47 -08:00
Stephen Birarda
ef778c554c Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-12 10:40:51 -08:00
Brad Davis
f521be10fe Avatar recording work in progress 2015-11-12 00:33:38 -08:00
Anthony J. Thibault
e698d3c1e8 Isolate JointStates within the Rig class
Except for SkeletalModel::computeBounds() JointStates are now completly
encapsulated by the Rig.  Now we can start using AnimPoses instead and
in parallel with the JointState implementation. Then we can assert that
they are identical, before removing JointStates.

This check in has many comments with the AJT tag.
Each one of these cases will need to be revisitied and fixed.
In particular // AJT: LEGACY will be used to enclose all code
in the Rig which manipulates the _jointState QVector.
2015-11-11 18:23:58 -08:00
Anthony J. Thibault
11440f92f4 Removed rig animations
* Deleted AnimationHandle class
* Removed enableAnimGraph and anableRigAnimations from Menu.
* Removed *some* references to old IK system.
  But it is still used when computing collision bounding volumes
2015-11-11 15:32:57 -08:00
Anthony J. Thibault
533773d1cd Removed animationHandles section from Avatar prefs 2015-11-11 13:21:37 -08:00
Anthony J. Thibault
56e96ed24c Merge branch 'master' into tony/script-start-stop-anim 2015-11-11 11:33:24 -08:00
Anthony J. Thibault
936c55a94e New MyAvatar animation JS interface
JavaScript changes:

* removed MyAvatar.playAnimation
* removed MyAvatar.stopAnimation
* removed MyAVatar.getGetAnimationDetails
* removed MyAvatar.startAnimationByRole
* removed MyAvatar.stopAnimationByRole
* removed MyAVatar.getGetAnimationDetailsByRole
* removed MyAVatar.clearJointPriorities

* added MyAvatar.overrideAnimation(url, fps, loop, firstFrame, lastFrame)
* added MyAvatar.restoreAnimation()
* added MyAvatar.getAnimationRoles()
* added MyAvatar.overrideRoleAnimation(role, url, fps, loop, firstFrame, lastFrame)
* added MyAvatar.restoreRoleAnimation(role)
* added MyAvatar.prefetchAnimation(url)

* update kneel.js with new api.
* added theBird.js to test role override api.

C++ changes:

* Added getParent() and replaceChild() to AnimNode
* Added findByName() and traverse() to AnimNode
* Changed AnimStateMachine to hold nodes by childIndex instead of smart pointer.
  This allows script to replace nodes dynamically via overrideRoleAnimation
2015-11-10 16:34:38 -08:00
Atlante45
ddf82c35e1 Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-10 14:18:49 -08:00
samcake
d3d5d3a19e Removing useless code 2015-11-10 12:02:20 -08:00
Anthony J. Thibault
eacc2cae0c WIP checkpoint 2015-11-09 18:36:23 -08:00
Anthony J. Thibault
af2b3bb9d5 MyAvatar: removed priority, hold and maskedJoints from playAnimation js call 2015-11-09 16:56:49 -08:00
Stephen Birarda
b42dea4555 Merge branch 'master' of https://github.com/Atlante45/hifi into baseball 2015-11-09 14:38:24 -08:00
Atlante45
767a7a7f1e Fix warnings on OS X 2015-11-09 14:26:23 -08:00
Atlante45
55c6706f76 Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-06 13:31:39 -08:00
Atlante45
ffafd3194e Recording audio fixes 2015-11-05 16:46:59 -08:00
Seth Alves
4ab727c47c Merge branch 'master' of github.com:highfidelity/hifi into parents 2015-11-04 13:57:59 -08:00
Atlante45
d9cd986db2 Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-04 11:26:16 -08:00
Anthony Thibault
275b248547 Merge pull request #6302 from AndrewMeadows/fix-avatar-drift
fix slow drift of avatar when wearing HMD
2015-11-04 11:19:45 -08:00
samcake
ce5e89ce66 removing the pulsing mechanism in MyAvatar and making a new stadnard.json mapping file 2015-11-04 10:53:53 -08:00
U-GAPOS\andrew
9de5721a48 set _hmdFollowVelocity to zero when done following 2015-11-04 10:23:55 -08:00
Atlante45
55894f2eee Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-03 17:46:24 -08:00
Seth Alves
ffb0317a50 Merge branch 'master' of github.com:highfidelity/hifi into parents 2015-11-03 16:53:00 -08:00
U-GAPOS\andrew
d544b7a645 fix bug: avatar can't walking when HMD at rest 2015-11-03 13:59:15 -08:00
Seth Alves
dba9eb7046 merge from upstream 2015-11-03 13:35:17 -08:00
Andrew Meadows
e160e2a7ae the minimal fix 2015-11-03 11:37:30 -08:00
Andrew Meadows
12ff9734e0 init _bodySensorMatrix in ctor 2015-11-03 11:26:49 -08:00
Stephen Birarda
bbf5991f9a resolve conflicts on merge with huffman/baseball 2015-11-02 14:14:36 -08:00
Stephen Birarda
017cee6961 make shouldRenderLocally do the right thing 2015-11-02 11:59:09 -08:00
U-GAPOS\andrew
a77f888f15 more correct HMD offset correction velocity 2015-11-02 11:29:17 -08:00
U-GAPOS\andrew
a545d770d8 fix bug preventing avatar motion in 2D mode 2015-11-02 11:07:43 -08:00
Andrew Meadows
9799693135 remove extra whitespace 2015-11-02 11:07:41 -08:00
Andrew Meadows
fd557c4e52 route HMD-following through the physics simulation 2015-11-02 11:07:40 -08:00
Seth Alves
3ac0fef1ea merge from upstream 2015-11-01 15:22:57 -08:00
Brad Davis
ccbae81dad Merge branch 'master' into HEAD
Conflicts:
	interface/src/avatar/SkeletonModel.cpp
2015-10-29 10:24:38 -07:00
Seth Alves
ac1055c3e0 Merge pull request #6214 from howard-stearns/goToPosition
Don't go to wrong position on startup/teleport.
2015-10-29 10:15:26 -07:00
Seth Alves
10717dc364 Merge pull request #6154 from howard-stearns/safe-avatar-list-access
Safe avatar list access
2015-10-29 10:12:34 -07:00
howard-stearns
62e56d3f13 Don't go to wrong position on startup/teleport.
This fixes one cause of being in the wrong place.
https://app.asana.com/0/32622044445063/61787931469907
2015-10-28 16:44:53 -07:00
Brad Davis
3c1a0930da Merge remote-tracking branch 'upstream/master' into HEAD
Conflicts:
	interface/src/avatar/MyAvatar.h
	libraries/script-engine/src/ScriptEngine.cpp
	libraries/script-engine/src/ScriptEngine.h
2015-10-28 13:38:22 -07:00
Howard Stearns
367175b8a6 Reduce lock time. 2015-10-28 10:49:19 -07:00
Brad Hefta-Gaub
19743c1f39 gak, build busters and more CR feedback 2015-10-27 16:16:03 -07:00
Brad Hefta-Gaub
eb19364129 CR feedback 2015-10-27 15:56:27 -07:00
Andrew Meadows
e35596428c cleanup comment 2015-10-27 14:43:18 -07:00
Brad Hefta-Gaub
5a42991e0c first pass at cleaning up MyAvatars use of PalmData 2015-10-27 13:51:42 -07:00
Andrew Meadows
8b285fd228 recover follow HMD behavior 2015-10-27 13:51:40 -07:00
Andrew Meadows
43aac813da more prep for shifting avatar during HMD motion 2015-10-27 13:15:38 -07:00
Andrew Meadows
a1f1e50431 split CharacterController btw phys and interface 2015-10-27 13:15:38 -07:00
Howard Stearns
7b0b77f4d1 getAvatarHash => withAvatarHash 2015-10-23 16:57:27 -07:00
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
a78f2a9577 have avatar make use of SpatiallyNestable 2015-10-18 09:48:46 -07:00
Seth Alves
275e77d29e remove old-style avatar referentials 2015-10-18 07:51:00 -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
Brad Hefta-Gaub
d14820d3ef Merge pull request #5880 from thoys/20668
Worklist job #20668 - JS: Add option to listen audio from camera
2015-09-23 20:40:32 -07:00
Anthony J. Thibault
0d7eae2d64 Fix slight translation error when rendering debug animation skeleton. 2015-09-23 11:42:55 -07:00
Anthony J. Thibault
d04f4d4b2b Added shared DebugDraw singleton. 2015-09-22 19:57:23 -07:00
Howard Stearns
c8960e23ec Merge branch 'master' of https://github.com/highfidelity/hifi into apostrophe 2015-09-22 10:55:26 -07:00
Thijs Wenker
dfb9034b4e - delete new AudioListenerMode menu on script ending
- style fix (function naming)
2015-09-22 15:45:57 +02:00
Thijs Wenker
81932fe1d7 - added MyAvatar.audioListenerModeChanged signal , for registering changes.
- updated the developerMenuItems.js script to include AudioListenerMode menu options under Developer > Audio
2015-09-22 15:38:53 +02:00
Thijs Wenker
617f048883 Added JS interface to change audio listening position / orientation in Interface
- MyAvatar.audioListenerMode  change using:   MyAvatar.FROM_HEAD    , MyAvatar.FROM_CAMERA , MyAvatar.CUSTOM
- MyAvatar.customListenPosition   and  MyAvatar.customListenOrientation are for manual listening positions
2015-09-22 13:40:33 +02:00
Howard Stearns
71b7f9ee38 Apostrophe key resets animation state. 2015-09-21 19:14:24 -07:00
Howard Stearns
4dd95be8c4 Forgot to actually persist. 2015-09-21 15:06:11 -07:00
Howard Stearns
8b701b8a5b Provide a place in the advanced avatar section of preferences in which users can specify a different animation graph spec.
Takes effect when you save (if you have enabled the anim graph under developer->avatar).
An empty string gives you the default behavior.
2015-09-21 10:26:04 -07:00
Anthony J. Thibault
eadf212418 Updated avatar.json with talking idle animation. 2015-09-18 18:31:53 -07:00
Anthony J. Thibault
5aeebba90e Renamed AnimController to AnimManipulator, Removed offsets on IK targets 2015-09-16 15:49:47 -07:00
Anthony J. Thibault
70f5835278 Updated left hand point and grab State Machine and animations 2015-09-15 18:00:13 -07:00
Anthony J. Thibault
1948829ca8 Improved state machine for right hand.
The hand state machine has the following features

* There's a idle to point animation, followed by a looping point hold state.
* There's a point to idle animation.
* The grab state is composed of a linear blend between an open and closed pose.

Additionally the C++ code will ramp on the left and right hand overlays,
This allows the fingers to be animated normally when the user is not actively
pointing or grabbing.
2015-09-15 15:09:08 -07:00
Anthony J. Thibault
90f46ba2c8 Added hand state machines to AnimGraph.
* Application: Forward trigger values to the MyAvatar's PalmData
* SkeletonModel: Pass PalmData to Rig via updateRigFromHandData() this is more explicit then
  the Rig::inverseKinematics methods.
* AnimNodeLoader & AnimOverlay: add support for LeftHand and RightHand bone sets
* Rig::updateRigFromHandData() read the triggers and set stateMachine trigger vars
* avatar.json - udpated with new hand state machine with temporary animations
2015-09-14 18:54:12 -07:00
Howard Stearns
4ffe2d0747 Merge pull request #5786 from AndrewMeadows/ik-with-constraints
inverse kinematics works with rotation constraints
2015-09-11 17:34:50 -07:00
Andrew Meadows
9c6060160a Merge pull request #5784 from howard-stearns/rationalize-rig-settings
Rationalize rig settings
2015-09-11 16:56:44 -07:00
Brad Davis
e458eb7ae9 Merge pull request #5734 from sethalves/octree-shared-pointers
octree uses shared pointers
2015-09-11 16:00:04 -07:00
Andrew Meadows
c589f0e58e fix logic around rendering of hand targets 2015-09-11 13:42:17 -07:00
Andrew Meadows
8d5106b072 improved debug render of hand coordinates
also cleaned up includes in Hand.h
2015-09-11 13:22:11 -07:00
Howard Stearns
02fba12a48 Merge branch 'master' of https://github.com/highfidelity/hifi into rationalize-rig-settings 2015-09-11 11:53:19 -07:00
Howard Stearns
67ce0966d1 Rationalize the rig state setters. 2015-09-11 11:52:20 -07:00
Anthony J. Thibault
7996a02bd8 Added head target to AnimGraph IK node.
* In HMD mode head orientation and position is set.
* When not in HMD only orientation is set, position should
  default to the underlying pose position.
2015-09-11 09:48:48 -07:00
Anthony J. Thibault
3149baeefc Merge branch 'master' into tony/ik-and-controllers 2015-09-10 11:04:31 -07:00
Anthony J. Thibault
68076ccf45 updated anim graph url to use ik-avatar.json 2015-09-10 10:57:30 -07:00
Howard Stearns
da6444a776 Start anim graph in the right saved state on startup. 2015-09-09 17:02:55 -07:00
Howard Stearns
bcf16e52af Merge branch 'master' of https://github.com/highfidelity/hifi into animGraph-cleanup 2015-09-09 16:04:15 -07:00
Howard Stearns
c1d68e058e Reduce interconnection between AnimGraph and SkeletonModel by removing init and having MyAvatar:initAnimGraph go directly to rig (just like destroyAnimGraph does). 2015-09-09 15:02:11 -07:00
Howard Stearns
73a5714d66 Merge branch 'master' of https://github.com/highfidelity/hifi into decouple-avatar-updates 2015-09-09 10:37:11 -07:00
Anthony J. Thibault
75ecf0020d WIP commit, added AnimController node. 2015-09-08 20:34:21 -07:00
Seth Alves
9c4fdfd653 merge from upstream 2015-09-08 18:01:07 -07:00
Howard Stearns
2c856e4b08 Work around animation cache misbehavior wrt threads. 2015-09-08 16:22:06 -07:00
Seth Alves
31fcd55d47 octree uses shared pointers 2015-09-08 11:59:48 -07:00
Howard Stearns
efeaf21305 Checkpoint smoother. 2015-09-07 16:32:51 -07:00
Howard Stearns
0065c64b31 Snapshot of no-judder, before cleanup. 2015-09-07 09:57:05 -07:00
Anthony J. Thibault
69e463bbfd AnimDebugDraw Improvements
* Now always works, regardless of whether or not Rig or AnimGraph animations
  are enabled.
* Changed joint radius to 1 cm.
* Changed xyz axis length to 4 cm.
2015-09-04 16:01:05 -07:00
Howard Stearns
d3106de7c1 Merge branch 'master' of https://github.com/highfidelity/hifi into decouple-avatar-updates 2015-09-04 14:32:58 -07:00
Anthony J. Thibault
df28c7bf1a Merge branch 'master' into ajt/new-anim-system 2015-09-04 09:27:02 -07:00
Brad Hefta-Gaub
2eb3d90ac2 Merge pull request #5708 from howard-stearns/new-default-avatar-collision-sound
Change default avatar collision sound
2015-09-04 08:48:30 -07:00
Anthony J. Thibault
3716d5612b Merge branch 'master' into ajt/new-anim-system 2015-09-03 19:20:06 -07:00
Anthony J. Thibault
85cb503152 Made Enable Anim Graph menu option dynamic.
It will load the anim graph when enabled and destroy
the anim graph when disabled.
2015-09-03 14:46:44 -07:00
Seth Alves
36ca789d92 fix differential avatar-joint sending to work if more than 2 avatars are in the domain 2015-09-03 14:08:04 -07:00
Howard Stearns
d53c1d0fba Change default avatar collision sound.
Note that this only used when Interface.ini does not already have a setting, and the empty string is a valid setting.
To reset to default, either delete Interface.ini or the line in it that begins with collisionSoundURL=, or just set
Interface|Edit->Preferences->Avatar collision sound URL to
https://hifi-public.s3.amazonaws.com/sounds/Collisions-otherorganic/Body_Hits_Impact.wav
2015-09-03 13:22:04 -07:00
Anthony J. Thibault
30264e9c3d Added animation debug draw items to menu.
* Debug Draw Bind Pose - used to display the current avatar's bind pose
* Debug Draw Animation - used to display the current avatar's AnimGraph animation.
  Currently does not work with old animation so it's only valid when Enable Anim Graph is true.
* Draw Mesh - used to hide or display the avatar mesh.
2015-09-02 21:04:29 -07:00
Anthony J. Thibault
46b3a7fd23 Improved default avatar.json state machine.
Now triggers 7 states.
Idle, WalkFwd, WalkBwd, StrafeLeft, StrafeRight, TurnLeft & TurnRight.
As well as variable speed walking to match current velocity.
2015-09-02 17:28:06 -07:00
Anthony J. Thibault
4a749a0403 Updated MyAvatar to use animGraph from gist instead of local host. 2015-09-02 10:41:04 -07:00
Anthony J. Thibault
d151474446 Merge branch 'master' into ajt/new-anim-system 2015-09-02 10:00:36 -07:00