Commit graph

51 commits

Author SHA1 Message Date
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
HifiExperiments
cbce911e83 fix lag on restart with scaled avatar 2020-07-17 14:40:40 -07:00
Andrew Meadows
7cf0899d59 more correct safeLanding trigger 2019-08-20 17:33:29 -07:00
Andrew Meadows
32400a6baf improved isStuck detection and MyAvatar::safeLanding() trigger 2019-08-20 17:33:29 -07:00
Andrew Meadows
ce96ea5bf8 more correct rebuild OtherAvatar detailed pickable shapes 2019-06-17 11:20:42 -07:00
Andrew Meadows
3eed8218ca overhaul of MotionState and shape creations 2019-05-06 17:37:35 -07:00
luiscuenca
f54f9e5bfd Merge branch 'master' into multiSphereAvatar04 2019-01-25 13:54:01 -07:00
luiscuenca
df4be641eb More fixes 2019-01-25 13:42:18 -07:00
luiscuenca
a947c894c2 Suggested changes 2019-01-23 17:23:36 -07:00
raveenajain
2393db5e12 collision logic 2019-01-21 16:24:32 -08:00
raveenajain
d2e37d0c90 my and other avater changes, if setting toggled can pass through other avatar 2019-01-18 16:50:44 -08:00
luiscuenca
2158e084d4 Add avatar joints filter to intersection calculation 2019-01-17 14:01:36 -07:00
luiscuenca
a7f143dbce Merge branch 'master' into multiSphereAvatar04
# Resolved Conflicts:
#	interface/src/avatar/MyAvatar.h
#	interface/src/avatar/OtherAvatar.cpp
2019-01-15 18:27:04 -07:00
luiscuenca
71e7023a3e Refactor and optimizations 2019-01-15 18:07:50 -07:00
luiscuenca
19701ef333 Fix scale and add rayTest 2019-01-11 15:36:07 -07:00
sabrina-shanman
a8b2da14cf Format numeric constant in strafe crash commit to match coding standards 2018-06-20 08:45:12 -07:00
sabrina-shanman
45fdf3d68f Fix crash when walking sideways 2018-06-19 17:23:00 -07:00
ZappoMan
f63db42c0e migrate SpatiallyNestable::getOrientation to getWorldOrientation, remove redundant getRotation 2017-10-28 10:14:25 -07:00
ZappoMan
a7a0f03ede rename SpatiallyNestable::getPosition() to SpatiallyNestable::getWorldPosition() 2017-10-27 18:39:17 -07:00
Anthony J. Thibault
85500841fb Crash fix for avatars that are missing "Hips", "Head" and other required joints. 2017-08-04 11:19:09 -07:00
Andrew Meadows
d065b569d3 support for variable avatar mass by size 2017-05-16 16:03:51 -07:00
Andrew Meadows
d34b667e82 remove kinematic character controller implemention 2017-05-05 09:35:49 -07:00
Andrew Meadows
e21bd7a67a help avatar walk up steps 2017-05-05 09:35:49 -07:00
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
Andrew Meadows
445c730ca3 remove cruft, fix formatting and spelling 2016-12-01 10:38:13 -08:00
Andrew Meadows
d749697c46 scan bottom points during hover-HMD-drive 2016-11-15 12:05:44 -08:00
Andrew Meadows
5e273664db improved ray tests for HMD driving 2016-10-26 17:28:35 -07:00
Andrew Meadows
42c6996aee fix warning about unused variable 2016-10-24 14:05:28 -07:00
Andrew Meadows
8ecc23f62b HMD drive stops against simple walls 2016-10-24 08:26:44 -07:00
Andrew Meadows
06866957d0 first pass (theoretical) HMD ray-traced step logic 2016-10-24 08:26:44 -07:00
Andrew Meadows
f414ffaf98 fix crash in MyCharacterController on shutdown 2016-10-18 21:03:02 -07:00
Andrew Meadows
a4308f08a4 remove debug cruft 2016-10-18 16:50:19 -07:00
Andrew Meadows
6a445a0a98 more correct steepest walkable slope detection 2016-10-18 16:48:33 -07:00
Andrew Meadows
5a04c7ceee remove tabs in formatting 2016-10-18 13:09:42 -07:00
Andrew Meadows
ecc6cb49ae more correct hitFraction adjustments 2016-10-18 11:42:31 -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
Andrew Meadows
72ad974b3e improved shape prevents avatar walking up walls 2016-10-15 16:00:02 -07:00
Andrew Meadows
d29386c43f better tracking of avatar gravity setting 2016-09-29 11:14:19 -07:00
Andrew Meadows
06ff984f90 sky-hook for walking up steps 2016-09-22 09:48:59 -07:00
Andrew Meadows
f5c5c68937 adding kinematic character controller demo 2016-09-14 11:43:52 -07:00
Anthony Thibault
1e94d9bdf5 interface/src/avatar: cppcheck fixes 2016-03-13 18:56:15 -07: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
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
e9f52b1211 properly scale avatar collision shape 2015-12-15 18:18:08 -08:00
Andrew Meadows
8c109fd623 move raw bullet code from interface to physics lib 2015-12-08 17:21:43 -08:00
U-GAPOS\andrew
91bc7ca062 cleanup start/stop logic for HMD follow 2015-11-13 14:04:36 -08:00
Andrew Meadows
43aac813da more prep for shifting avatar during HMD motion 2015-10-27 13:15:38 -07:00
Andrew Meadows
24c2f538a4 keep MyAvatar RigidBody on shape changes 2015-10-27 13:15:38 -07:00
Andrew Meadows
355ebe923d cleanup and comments 2015-10-27 13:15:38 -07:00
Andrew Meadows
5e59e9595b fix typo in comments 2015-10-27 13:15:38 -07:00