Commit graph

1539 commits

Author SHA1 Message Date
Phil Palmer
3e25e32f18 Revert temporary "added pragmas" (optimize off)
This reverts commit 20e4f952ab.
2020-12-27 02:52:52 -05:00
Phil Palmer
c9cf7eb75d Merge branch 'fix/vr-recenter-PRAGMAS' into fix/vr-recenter 2020-12-26 23:22:16 -05:00
Phil Palmer
20e4f952ab added pragmas 2020-12-26 23:19:21 -05:00
Phil Palmer
a489e9ddca Code style: made some little things more conformant with the coding standards and the rest of the codebase.
https://github.com/vircadia/vircadia/blob/master/CODING_STANDARD.md
2020-12-23 19:00:05 -05:00
Phil Palmer
6fc40385ca Fix compile error building macOS-latest: changed MINIMUM_TIME_REMAINING from const to constexpr in CharacterController::playerStep.
Error was: "static_assert expression is not an integral constant expression", "read of non-constexpr variable 'MINIMUM_TIME_REMAINING' is not allowed in a constant expression".
Error started in last commit (2179c153de).
2020-12-22 15:51:03 -05:00
Phil Palmer
2179c153de VR fixes for: couldn't sit on the floor, wrong walk directions.
- Divided the option "Avatar leaning behavior" into two options that work more usefully: "Allow my avatar to stand" and "Allow my avatar to lean" (PreferencesDialog.cpp).  Made the necessary fixes so that the avatar can be set to stand only when the user is standing (more details below).
- The logic controlling the direction of MyAvatar's action motor is now centralised in calculateScaledDirection (was previously split between there and updateMotors).  calculateScaledDirection now returns a velocity in world space.
- CharacterController::FollowHelper now uses separate follow timers for rotation, horizontal and vertical (previously followed all three based on the longest of their follow times).  Where appropriate, FollowHelper can now snap immediately to the desired rotation/horizontal/vertical independently (see FOLLOW_TIME_IMMEDIATE_SNAP).
- FollowHelper::FollowType has therefore moved to CharacterController::FollowType.
- MyAvatar::FollowHelper::postPhysicsUpdate: If MyAvatar is not allowed to stand when the user is sitting, this now avoids recentring the body based on the head height.
- Removed Q_PROPERTY(MyAvatar::SitStandModelType, as the sitting/standing/leaning model uses different enums now (see setAllowAvatarStandingPreference, setAllowAvatarLeaningPreference).
- Removed Q_PROPERTY(bool isSitStandStateLocked which is no longer used, because we now always track the user's real-world sit/stand state, regardless of what we're doing with it.
- MyAvatar::FollowHelper::shouldActivateHorizontal: If MyAvatar is not allowed to lean, this now returns true to recentre the footing if the head is outside the base of support.
- MyAvatar::FollowHelper::shouldActivateHorizontalCG: If MyAvatar is not allowed to lean, this now always returns true to recentre the footing.  Rearranged to avoid computing values that weren't used depending on the conditions.  Resolved some duplicated code.
- MyAvatar::setUserRecenterModel previously set HMDLeanRecenterEnabled based on the chosen mode, but it got reset when getting out of a sit.  Now HMDLeanRecenterEnabled is only controlled by the scripts.
- Added Rig::getUnscaledHipsHeight (like getUnscaledEyeHeight).  Refactored a little to avoid duplicated code.  Added DEFAULT_AVATAR_HIPS_HEIGHT which is the value that Rig::getUnscaledHipsHeight returns when using the default avatar.
- Fix for recentring not behaving as requested by the user after getting up from click-to-sit (always behaving like 'Auto') : MyAvatar::endSit now passes false to centerBody for 'forceFollowYPos'.
- Fix for incorrect vertical position of the avatar and viewpoint after changing lean recentre mode while not standing in the real world: MyAvatar::setAllowAvatarStandingPreference now calls centerBody with false for 'forceFollowYPos'.
- computeHipsInSensorFrame: The code now matches the comments in that it only skips the dampening of the hips rotation if the centre-of-gravity model is being used.
2020-12-22 14:22:27 -05:00
David Rowe
2222f8f4f6 Fix collision hull not necessarily being updated when model URL changed 2020-11-25 11:54:19 +13:00
HifiExperiments
cbce911e83 fix lag on restart with scaled avatar 2020-07-17 14:40:40 -07:00
Kasen IO
21fd10d154 Revert commit 359248829c using -m 1 to temporarily fix issue 383. 2020-06-03 16:08:18 -04:00
Sabrina Shanman
518d6a530a
Merge pull request #16507 from highfidelity/master
Merge master into instancing
2019-11-18 13:54:33 -08:00
Andrew Meadows
28f51f6204 add comments 2019-11-14 09:59:43 -08:00
Andrew Meadows
039f7cae13 avoid Qt container in another spot 2019-11-14 09:59:43 -08:00
Andrew Meadows
4159bc4862 abide by domain-entity hierarchy deletion rules 2019-11-14 09:59:43 -08:00
Andrew Meadows
9d92546a8b revert the revert of PR-16307 2019-11-14 09:59:43 -08:00
sabrina-shanman
a42e09aef8 Fix unused variables/implicit type conversions 2019-11-08 10:04:34 -08:00
sabrina-shanman
da5f80c139 Use std::vector types in ShapeInfo 2019-11-05 10:57:55 -08:00
HifiExperiments
1e100a672e merge with master and try to fix opacity mode stuff 2019-10-23 22:21:45 -07:00
Brad Hefta-Gaub
51669e1ac3
Revert "DEV-1811: apply deletion rules to linked entities" 2019-10-11 11:06:10 -07:00
Andrew Meadows
052a0c3ebe remove cruft, add comments, change variable name 2019-10-07 16:23:30 -07:00
Andrew Meadows
8ab70225d9 apply delete rules down linked hierarchy 2019-10-07 14:38:36 -07:00
Andrew Meadows
470a45c012 EntityItem::_owningAvatarID always AVATAR_SELF_ID for MyAvatar's entities 2019-10-07 14:38:36 -07:00
Andrew Meadows
99d0579007 remove updateEntitiesInternal(), make updateEntities() virtual 2019-10-07 14:38:36 -07:00
Andrew Meadows
9557ba80c9 all delete pass through EntitySimulation::prepareEntityForDelete() 2019-10-07 14:38:36 -07:00
Andrew Meadows
03db88009f simplify add/removal to EntitySimulation 2019-10-07 14:38:36 -07:00
Andrew Meadows
c8e875ff72 remove cruft 2019-10-07 14:35:28 -07:00
Andrew Meadows
72ba94f2cd unravel more spaghetti into PhysicalEntitySimulation 2019-10-07 14:35:28 -07:00
Andrew Meadows
86c60204fd move entity Action serialization to PhysicalEntitySimulation 2019-10-07 14:35:28 -07:00
Andrew Meadows
50f0c90519 don't forget to cleanup expired mortal entities 2019-09-24 14:00:21 -07:00
Andrew Meadows
434f5ff300 fix comment 2019-09-17 15:57:20 -07:00
Andrew Meadows
5ad0dd20ac update QueryAACube of unowned moving physical entities 2019-09-17 15:43:53 -07:00
Andrew Meadows
1119b9f29c update local QueryAACube on deactivation 2019-09-17 15:05:37 -07:00
Andrew Meadows
bc119d6c85 don't expect final kinematic simulation update 2019-09-12 17:02:19 -07:00
Andrew Meadows
e546ef23a8 don't bid for sim ownership of kinematic unless grabbed 2019-09-06 17:23:38 -07:00
HifiExperiments
97b9179144 merge with master 2019-09-05 00:46:56 -07:00
Andrew Meadows
b7ae55ca3e smaller CCD proxy for MyAvatar 2019-08-28 11:33:51 -07:00
Andrew Meadows
1beafbdd35 comment cleanup and final tuning 2019-08-28 09:48:15 -07:00
Andrew Meadows
6be3750b38 use collision brake feedback to prevent tunneling 2019-08-27 20:28:56 -07:00
Andrew Meadows
1314430f04 more checks to prevent thrusting through mesh 2019-08-27 13:51:54 -07:00
Sabrina Shanman
0f5ef9ecb3
Merge pull request #16097 from AndrewMeadows/less-MyAvatar-mesh-tunelling
BUGZ-1325: prevent MyAvatar from tunneling through mesh at high speeds
2019-08-26 16:16:10 -07:00
Andrew Meadows
8135021b25 watch for tunneling events and interfere before stuck 2019-08-23 17:54:52 -07:00
Clement
a607984d4e Fix debug builds 2019-08-23 17:04:54 -07:00
Shannon Romano
4d71891763
Merge pull request #16072 from luiscuenca/improveSphereCollapsing
BUGZ-1156: Improve sphere collapsing mode
2019-08-22 16:10:53 -07:00
Andrew Meadows
54c69001b9 clarify safeLanding retry rate 2019-08-20 17:33:29 -07:00
Andrew Meadows
7084908df3 add isStuck logging, add assert because singleton 2019-08-20 17:33:29 -07:00
Andrew Meadows
4f0c2c5ee6 remove incorrect assert 2019-08-20 17:33:29 -07:00
Andrew Meadows
434af8bdfb remove support for sub-contactAddecCallbacks from PhysicsEngine 2019-08-20 17:33:29 -07:00
Andrew Meadows
dba7cadcae remove cruft 2019-08-20 17:33:29 -07:00
Andrew Meadows
42d2d4bbe5 fix warning in VisualStudio 2019-08-20 17:33:29 -07:00
Andrew Meadows
113d132d8e use pairwise collision filtering to help unstuck MyAvatar 2019-08-20 17:33:29 -07:00
Andrew Meadows
7cf0899d59 more correct safeLanding trigger 2019-08-20 17:33:29 -07:00