Commit graph

34556 commits

Author SHA1 Message Date
daleglass
06b1a8e17c
Merge pull request #928 from Phil-Palmer/fix/vr-recenter
VR fixes for: couldn't sit on the floor, wrong walk directions.
2021-01-16 20:51:03 +01:00
Phil
646a5798e6
Apply suggestions from code review
Tidying (bracing style, spaces, remove final comma from enum, fix JSDoc comments).

Co-authored-by: David Rowe <david@ctrlaltstudio.com>
2021-01-04 00:12:57 -05:00
Phil Palmer
8c7c91ed6f Remove const from variable declarations as suggested in the review.
Suggested here: https://github.com/vircadia/vircadia/pull/928/files#r549830690

The ones I've left are either
- values known at compile time, eg. const float MIN_LENGTH_FOR_NORMALIZE = 0.061f;
- consts that were already there in the previous code, eg. const float MAX_DISPLACEMENT = 0.5f * _radius;
2020-12-29 19:31:35 -05:00
HifiExperiments
0f9f95f716 possible fix for physics 2020-12-28 23:46:37 -08:00
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
daleglass
f894a0a141
Merge pull request #877 from vircadia/feature/domain-server-reporting-socket
Send address and port with each metaverse heartbeat.
2020-12-26 20:40:58 +01: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
Kalila
89d1346644
Merge pull request #919 from ArcadeFever/fix/upgrade-android-oculus-sdk-23.0.0.1-and-1.37.0
Upgraded Oculus Mobile and Platform SDKs to latest (1.37.0 and 23.0.0)
2020-12-17 20:24:37 -05:00
Kalila
f1c9614076
Merge pull request #917 from JulianGro/gles
Fix building with GLES 3.2 on Linux
2020-12-17 20:23:26 -05:00
ArcadeFever
65fb1320cc Upgraded Oculus SDKs to latest 2020-12-15 00:04:59 -08:00
Kalila
633c642d4a
Merge pull request #906 from vircadia/fix/update-references
Fix/update references
2020-12-15 01:29:47 -05:00
Julian Groß
0cebb700fb Change conditionals according to review 2020-12-15 04:15:44 +01:00
Kalila
0f87e4cd86
Merge pull request #838 from ctrlaltdavid/fix/hud-recentering
HUD overlay fixes and improvements
2020-12-14 20:46:02 -05:00
Julian Groß
5e17639bed Fix building with GLES 2020-12-15 02:43:39 +01:00
Kalila
8c4ce96c63
Merge pull request #830 from HifiExperiments/update
Entity update improvements 2
2020-12-14 17:56:01 -05:00
Kalila L
16eca5d855 Get most 'project-athena' -> 'vircadia' references. 2020-12-13 04:42:34 -05:00
Kalila L
5d4612e400 Update 'kasenvr' -> 'vircadia' 2020-12-10 18:56:57 -05:00
daleglass
70f2866871
Merge pull request #860 from makitsune/fix-alt-on-linux
Fix alt key on Linux
2020-12-10 23:45:55 +01:00
kasenvr
86cbcb53a3
Merge pull request #882 from ctrlaltdavid/fix/jsdoc-typo
Fix JSDoc typo
2020-12-01 05:58:31 -05:00
Dale Glass
182302c3e7 GL_TEXTURE_FREE_MEMORY_ATI returns 4 values, not just 1
This should fix a buffer overflow that happens on ATI cards.
2020-11-28 02:07:08 +01:00
HifiExperiments
9a5b956968
Apply suggestions from code review
Co-authored-by: David Rowe <david@ctrlaltstudio.com>
2020-11-27 15:11:18 -08:00
HifiExperiments
c510a8fa3e add comment about material sphere scale 2020-11-27 15:10:14 -08:00
HifiExperiments
2ece568f09 fixing up simple-compound logic 2020-11-27 15:04:56 -08:00
Kalila L
97681786cd Potentially fix STUN IP+Port init for heartbeat issue? 2020-11-25 04:54:47 -05:00
HifiExperiments
2e780c34d1 Merge remote-tracking branch 'upstream/master' into update 2020-11-24 16:34:30 -08:00
kasenvr
4e1b6838cc
Merge pull request #871 from kasenvr/revert-868-revert-659-scriptEngine
Revert "Revert "Split Local and owned Avatar Entity scripts into their own ScriptEngine""
2020-11-24 18:43:33 -05:00
David Rowe
2222f8f4f6 Fix collision hull not necessarily being updated when model URL changed 2020-11-25 11:54:19 +13:00
David Rowe
eb70d15f77 Fix JSDoc typo 2020-11-23 19:13:48 +13:00
HifiExperiments
02f7f494fa Merge remote-tracking branch 'upstream/master' into gha 2020-11-16 21:48:46 -08:00
HifiExperiments
b6744588f4 loading fix 2020-11-16 21:25:25 -08:00
HifiExperiments
81940214bb
Revert "Revert "Split Local and owned Avatar Entity scripts into their own ScriptEngine"" 2020-11-16 21:20:25 -08:00
kasenvr
21f8eac936
Revert "Split Local and owned Avatar Entity scripts into their own ScriptEngine" 2020-11-16 22:35:46 -05:00
kasenvr
c3439a8ae7
Merge pull request #659 from HifiExperiments/scriptEngine
Split Local and owned Avatar Entity scripts into their own ScriptEngine
2020-11-15 23:12:54 -05:00
HifiExperiments
06f7624512 some more small improvements 2020-11-14 22:34:03 -08:00
Maki
ce8b9d4b24 Deleted old GLWidget code that breaks alt with current Qt on Linux 2020-11-12 22:17:15 +00:00
kasenvr
5080909bb9
Merge pull request #664 from kasenvr/feature/require-redownload
Feature/require redownload
2020-11-12 17:10:08 -05:00
kasenvr
8f4f15ba25
Merge pull request #853 from ctrlaltdavid/fix/enter-entity
Fix enterEntity event not firing in entity script after content reload
2020-11-12 01:02:55 -05:00
HifiExperiments
3b2c219e53 possibly more robust fix? 2020-11-10 21:39:15 -08:00
HifiExperiments
b3e9c1e8f8 Merge remote-tracking branch 'upstream/master' into scriptEngine 2020-11-09 22:00:11 -08:00
HifiExperiments
696239a97b try to fix android build 2020-11-09 21:27:40 -08:00
HifiExperiments
7bfbf3c99c Merge remote-tracking branch 'upstream/master' into update 2020-11-09 19:33:38 -08:00
HifiExperiments
ccd5ef80b3 remove isActive, fix contains, maybe fix green box issue 2020-11-09 19:14:30 -08:00
David Rowe
2cfd2c8d32 Merge branch 'master' into fix/hud-recentering 2020-11-10 09:27:05 +13:00
kasenvr
b091557cb5
Merge pull request #848 from humbletim/smarter-scriptcache
ScriptCache: add local file change detection
2020-11-05 17:20:04 -05:00
HifiExperiments
c8532a1ac5 another unused variable 2020-11-04 22:21:24 -08:00
HifiExperiments
a7e6332c0e fix alpha material bug 2020-11-04 22:09:11 -08:00