Commit graph

1208 commits

Author SHA1 Message Date
Andrew Meadows
0f643b7d66 add check to avoid divide by zero 2017-05-08 10:59:15 -07:00
Andrew Meadows
f00a3cafb6 cleanup logic to be more readable 2017-05-08 10:52:54 -07:00
Seth Alves
7a1a9d6496 start on code to remap constraint IDs during import 2017-05-07 19:42:04 -07:00
Seth Alves
b2ccc33a79 Merge branch 'master' of github.com:highfidelity/hifi into motor-action 2017-05-05 14:52:07 -07:00
Andrew Meadows
2bfbb63906 remove unused variable 2017-05-05 09:37:01 -07:00
Andrew Meadows
8ed93783bd fix step up velocity calculation 2017-05-05 09:37:01 -07:00
Andrew Meadows
cd7be46b70 tweak threshold for minimum stepheight 2017-05-05 09:37:01 -07:00
Andrew Meadows
6e8d90e3b6 restore clear of follow accumulators 2017-05-05 09:37:01 -07:00
Andrew Meadows
fe401c7488 improved management of collisionless avatar state 2017-05-05 09:37:00 -07:00
Andrew Meadows
95a4bb9ef4 fix transition height from hover to stand 2017-05-05 09:35:49 -07:00
Andrew Meadows
e449c48888 remove one more line of cruft 2017-05-05 09:35:49 -07:00
Andrew Meadows
d34b667e82 remove kinematic character controller implemention 2017-05-05 09:35:49 -07:00
Andrew Meadows
94ee6d6838 fix driving motion of collisionless avatars 2017-05-05 09:35:49 -07:00
Andrew Meadows
e21bd7a67a help avatar walk up steps 2017-05-05 09:35:49 -07:00
Andrew Meadows
a31a861e19 fix typo: physcis --> physics 2017-05-05 09:33:50 -07:00
Seth Alves
c693687927 react to very small vectors instead of just zero-length ones 2017-05-03 20:23:10 -07:00
Seth Alves
f867a8e718 guard against bad hinge-constraint settings 2017-05-03 20:12:42 -07:00
Seth Alves
a259d00b63 Merge pull request #10332 from sethalves/bullet-constraints-5
Bullet constraints
2017-05-03 16:30:34 -07:00
Seth Alves
3ec3005c6d code review 2017-05-01 15:32:17 -07:00
Seth Alves
598937df89 first try at angular-velocity setting action 2017-05-01 15:26:17 -07:00
Seth Alves
7f69bdecb2 first try at angular-velocity setting action 2017-05-01 07:06:21 -07:00
Seth Alves
1b67a8b251 cleanups 2017-04-30 12:23:34 -07:00
Seth Alves
dabec586ec if spring is linked to another entity which we can't find, disable the spring 2017-04-30 11:01:34 -07:00
Seth Alves
c9dfebb713 allow spring action to have targets relative to another entity 2017-04-30 10:58:58 -07:00
Seth Alves
7ce0ef2ec4 fix spring action so that it can be linear or rotational or both 2017-04-30 10:04:07 -07:00
Seth Alves
8f2fc24885 remove motors from constraints 2017-04-29 15:46:04 -07:00
Seth Alves
41f699ec9b fix hinge limits 2017-04-29 14:28:56 -07:00
Seth Alves
e52c94895e remove motor from hinge. fix hinge limits 2017-04-29 14:18:14 -07:00
Seth Alves
4c4e0dffcc bullet cone-twist constraint 2017-04-29 12:30:12 -07:00
Seth Alves
6623028d71 ball-and-socket constraint 2017-04-29 08:35:55 -07:00
Andrew Meadows
32c367b644 use 'using' rather than 'typedef' 2017-04-28 10:18:15 -07:00
Seth Alves
21df08aa88 set limits when slider constraint is first created 2017-04-27 14:02:38 -07:00
Andrew Meadows
2441536de3 remove Avatar dependency on AvatarMotionState 2017-04-27 13:16:49 -07:00
Andrew Meadows
aceac12398 use 'using' instead of 'typedef' 2017-04-27 13:11:57 -07:00
Seth Alves
b196dd082b expose bullet slider constraint to javascript 2017-04-27 07:56:35 -07:00
Seth Alves
b65b34a81b try to allow axisInA to be adjusted on the fly 2017-04-22 20:45:23 -07:00
Seth Alves
f172730a38 try to allow axisInA to be adjusted on the fly 2017-04-22 20:09:14 -07:00
Seth Alves
25070c3bca try not bringing motor target into -PI,PI range 2017-04-22 17:56:40 -07:00
Seth Alves
e9461f812d don't run motor for other's hinge 2017-04-22 17:09:26 -07:00
Seth Alves
59950236d3 attempt to make hinge motor work better 2017-04-22 16:22:00 -07:00
Seth Alves
21ca767b7c remove setPosition and setRotation for actions because they were never finished and never used. 2017-04-18 11:59:16 -07:00
Seth Alves
fbd4677a9a add a way to set hinge-constraint motor speed from javascript 2017-04-15 21:10:02 -07:00
Seth Alves
b4ff3a8691 don't destroy and recreate constraints when reinserting rigid body 2017-04-15 21:08:59 -07:00
Seth Alves
d42970d480 fix hinge-constraint constructors to use otherAxis 2017-04-15 08:51:08 -07:00
Seth Alves
f08fecbfa7 make sure new constraint data gets transmitted over network 2017-04-14 16:25:27 -07:00
Seth Alves
708008d8a5 cleanups 2017-04-14 13:43:48 -07:00
Seth Alves
07b23b8235 expose other hinge-constraint parameters to javascript 2017-04-14 13:28:25 -07:00
Seth Alves
d0144f4110 avatar-action-far-grab works now 2017-04-14 12:44:54 -07:00
Seth Alves
b1dc5be316 make far-grab it's own action (which is just like spring) in order to avoid bootstrapping own avatar 2017-04-14 11:48:06 -07:00
Seth Alves
2dab3069da fix bug that was causing spring action to cause constant re-insertion of its rigidbody into bullet. store UUIDs rather than shared pointers in _objectDynamicsByBody so that refcounting works right and actions get their destructors called. 2017-04-14 11:06:40 -07:00
Seth Alves
f5a5369055 attempt to remove dynamics associated with a rigid-body before removing the rigid-body 2017-04-14 07:06:53 -07:00
Seth Alves
52aee63e05 keep track of objectDynamics per rigidBody 2017-04-14 06:08:58 -07:00
Seth Alves
afa8fc161b allow hinge constraint between two entities 2017-04-13 15:37:28 -07:00
Seth Alves
9f252f04e7 cleanups 2017-04-12 07:25:23 -07:00
Seth Alves
53cb192af1 fixed names of pivot and axis 2017-04-12 07:22:27 -07:00
Seth Alves
cc77fce95f hinge is sort-of working 2017-04-12 07:12:05 -07:00
Seth Alves
2b0315645c actions work again 2017-04-11 21:11:03 -07:00
Seth Alves
74c0a70cb0 rename base action classes to dynamics, start on constraints 2017-04-11 20:39:13 -07:00
Seth Alves
e1e51614d9 don't hang loop if entity isDead 2017-03-24 11:16:54 -07:00
Brad Hefta-Gaub
bc5d7d8698 Merge pull request #9851 from AndrewMeadows/simulation-ownership-2
zero velocity of deactivated dynamic entities
2017-03-20 10:20:11 -07:00
Andrew Meadows
bde2222dfd actually use worldTrans 2017-03-10 18:30:56 -08:00
Andrew Meadows
9c9eb87925 sync RigidBody on deactivation 2017-03-10 12:55:16 -08:00
Andrew Meadows
2c141fd555 more correct comment 2017-03-10 09:18:29 -08:00
Andrew Meadows
a16760278e remove debug code 2017-03-09 17:58:53 -08:00
Andrew Meadows
be3012181f force local deactivation on remote deactivation 2017-03-09 17:53:17 -08:00
Andrew Meadows
8ddcae2a15 restore transform of deactivated entities 2017-03-09 17:26:53 -08:00
Andrew Meadows
d4abdcb6c8 comments, namechange, and temporary debug code 2017-03-09 17:26:53 -08:00
Andrew Meadows
ffe69acb5c fix rare physics crash 2017-03-08 19:26:12 -08:00
Andrew Meadows
d749c0c8be use fabsf() rather than fabs() 2017-03-06 15:50:32 -08:00
Andrew Meadows
10b3e7fc67 sphere shapeType for models means 'sphere' 2017-03-06 15:14:51 -08:00
Chris Collins
194fd925cf Merge pull request #9609 from sethalves/tablet-ui-fix-equipping
don't send AVATAR_SELF_ID over wire
2017-02-06 16:56:11 -08:00
Seth Alves
2ea07390c8 when the parentID is changed by a network update, set physics flags 2017-02-06 12:10:26 -08:00
howard-stearns
dacaa3df1d Send new entity physics packet from physics simulation, accept in server,
and make it go through filter (when supplied) regardless of lock rights.
2017-02-06 11:12:18 -08:00
Seth Alves
ab954412c1 if an entity has an avatar parent but ends up in EntityMotionState::setWorldTransform, ignore the update from bullet 2017-02-06 09:50:48 -08:00
Seth Alves
22f9fc7061 don't call stepKinematicMotion on kinematic entities when they are children of avatars 2017-02-03 16:36:06 -08:00
Seth Alves
c7200d2d3a make hasAncestorOfType understand AVATAR_SELF_ID 2017-02-03 16:14:15 -08:00
Seth Alves
174c674fd3 don't call stepKinematicMotion on kinematic entities 2017-02-03 15:50:59 -08:00
Seth Alves
6b44f62982 don't honor gravity in simple extrapolation on entities equipped by others 2017-02-02 14:20:21 -08:00
Thijs Wenker
174a7ad5bd Optimizations and style fixes from code review 2017-01-31 22:54:58 +01:00
Seth Alves
7c2957cfa7 merge from upstream 2017-01-31 08:57:36 -08:00
Andrew Meadows
aa8e7d27db move depth filtering closer to source 2017-01-30 13:21:23 -08:00
Andrew Meadows
b5537304a3 more correct CONTINUE collision event filter 2017-01-30 13:21:23 -08:00
Andrew Meadows
2541bfb1a8 only create collision events for owned entities 2017-01-30 13:21:23 -08:00
Andrew Meadows
2162a364a9 minor cleanup 2017-01-30 13:21:23 -08:00
Andrew Meadows
54b4612ee3 fix for missed START collision events 2017-01-30 13:18:26 -08:00
Seth Alves
c317ba8054 merge from upstream 2017-01-25 15:57:53 -08:00
Atlante45
5db37fff95 More entity script server work 2017-01-17 13:47:45 -08:00
Seth Alves
a47aaea37a don't bootstrap self with an avatar hold action 2017-01-12 10:12:45 -08:00
Brad Hefta-Gaub
dbbed462b4 cleanup naked qDebug() calls 2016-12-19 22:24:25 -08: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
2bbe2be516 fix spelling: physcis --> physics 2016-12-01 10:50:10 -08:00
Andrew Meadows
ae699e2a65 add initializer for member variable 2016-12-01 10:41:40 -08:00
Andrew Meadows
445c730ca3 remove cruft, fix formatting and spelling 2016-12-01 10:38:13 -08:00
Andrew Meadows
a04b7ae297 fix hover-drive in HMD 2016-11-15 11:45:09 -08:00
Andrew Meadows
ccdf383151 Merge hifi/master into hifi/out-of-body-experience 2016-11-07 08:24:26 -08:00
Andrew Meadows
0d2cec290d use convexHull for ellipsoidal "spheres" 2016-11-03 17:56:38 -07:00
Andrew Meadows
38e4ac0ae9 Merge master into out-of-body-experience 2016-10-26 16:59:31 -07:00
Chris Collins
9846614468 Merge pull request #8879 from AndrewMeadows/show-physics-stats
add Bullet profile info to PerformanceTimer stats
2016-10-25 06:29:27 -07:00
Andrew Meadows
51a9a99381 Merge hifi/master into hifi/out-of-body-experience 2016-10-24 08:13:42 -07:00
Andrew Meadows
e44672180a add Bullet profile info to PerformanceTimer stats 2016-10-21 13:22:22 -07:00
Seth Alves
b31acc421a fix crash on startup 2016-10-20 10:36:14 -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
515b8ef395 fix build error on windows 2016-10-16 06:27:13 -07:00
Andrew Meadows
72ad974b3e improved shape prevents avatar walking up walls 2016-10-15 16:00:02 -07:00
Andrew Meadows
6125357104 restore avatar steps up without sweeps 2016-10-14 22:35:37 -07:00
Anthony J. Thibault
35aebd21e6 Fix for upward jerk, when switching between domains. 2016-10-13 18:10:53 -07:00
Anthony J. Thibault
cc7a6ada38 Merge branch 'master' into out-of-body-experience 2016-10-05 17:16:39 -07:00
Andrew Meadows
e46c15401a take care for division by zero when normalizing 2016-10-05 15:00:22 -07:00
Andrew Meadows
5154e98a2e remove warning about unused variable 2016-10-05 13:43:22 -07:00
Andrew Meadows
084a1cf8ae fix avatar step-up behavior -- eliminate hop 2016-10-05 10:59:30 -07:00
Andrew Meadows
9544c749ea cleanup 2016-10-04 15:01:03 -07:00
Andrew Meadows
cd61f55c4a avatar jumps to HMD position at large offset
if the avatar has a large offset to HMD position
it will teleport to its target position
when that jump does not put it into a state of penetration
2016-10-04 12:09:29 -07:00
Andrew Meadows
681bdf4c23 can scan for penetration at arbitrary positions 2016-10-04 12:09:29 -07:00
Andrew Meadows
4fb6d5023b prevent avatars from walking up walls 2016-09-29 11:14:19 -07:00
Andrew Meadows
d29386c43f better tracking of avatar gravity setting 2016-09-29 11:14:19 -07:00
Andrew Meadows
9fa9784135 fix typo that broke build 2016-09-29 11:09:09 -07:00
Andrew Meadows
a443cd65f4 add comment for simple noise filter 2016-09-28 18:08:06 -07:00
Andrew Meadows
4e1c1aec0a less magic 2016-09-28 18:06:00 -07:00
Andrew Meadows
a10ae20bf7 measure avatar velocity while driving
and add to followVelocity for tighter tracking at high speeds
2016-09-28 08:29:12 -07:00
Anthony J. Thibault
9a804e19fc Fix for null gravity when falling off ledges 2016-09-27 18:44:54 -07:00
Anthony J. Thibault
961d262df1 Improved body follow behavior
* follow helper lean re-centering / reconciliation now modifies bodySensorMatrix, NOT the character controller.
* The character controller now always follows the bodySensorMatrix (in world space).

This decouples the lean re-centering velocity from the velocity used to move the character controller.
We can now independently tune these things separately.
2016-09-27 16:38:48 -07:00
Anthony J. Thibault
c327c5c6ce coding convention fix 2016-09-27 09:47:44 -07:00
Anthony J. Thibault
9567ec11af Prevent character from walking when pinned against collision.
This is fixed by using the pre-action velocity from CharacterController, which does not include any motors or follow velocity.
This pre-action velocity reflects the actual rigid body velocity after collision constraints are resolved.

This should prevent the character f
2016-09-23 15:22:52 -07:00
Anthony J. Thibault
98ffea2fb9 Merge branch 'master' into out-of-body-experience 2016-09-22 18:08:23 -07:00
Andrew Meadows
819e1dc694 prevent avatars from walking up vertical walls 2016-09-22 16:12:35 -07:00
Andrew Meadows
06ff984f90 sky-hook for walking up steps 2016-09-22 09:48:59 -07:00
Anthony J. Thibault
9fa8fc11c9 More stability in hips offset calculation. 2016-09-21 18:20:35 -07:00
Andrew Meadows
dfe828982b remove cruft 2016-09-20 14:04:22 -07:00
Andrew Meadows
3c5e13b34b final tuning of follow speeds 2016-09-20 13:45:31 -07:00
Andrew Meadows
3e02bac412 more velocity tuning 2016-09-20 10:45:13 -07:00
Andrew Meadows
55e1d05887 more follow velocity tuning 2016-09-20 10:11:25 -07:00
Andrew Meadows
0ef8ef4734 tune follow speeds 2016-09-20 09:37:51 -07:00
Andrew Meadows
59e6ca8f8d avatar follows HMD using velocity motor 2016-09-20 08:29:55 -07:00
Andrew Meadows
a8af8d6027 move code into CharacterController::updateState() 2016-09-20 08:29:55 -07:00
Andrew Meadows
8dd5c9b92b fix kinematic motion for ground and hover 2016-09-20 08:29:55 -07:00
Andrew Meadows
1db1295556 cleanup around CharacterController::_targetVelocity 2016-09-20 08:29:55 -07:00
Andrew Meadows
c77f6a7c16 Merge pull request #8614 from hyperlogic/out-of-body-experience
Turn and drive the HMD with linear velocity
2016-09-16 15:43:29 -07:00
Andrew Meadows
49224d9698 avoid unecessary branch 2016-09-16 14:50:08 -07:00
Andrew Meadows
20418d5f58 fix hips sweep test 2016-09-15 18:39:57 -07:00
Anthony J. Thibault
c7caf9fe06 Turn and drive the HMD with linear velocity 2016-09-15 17:08:36 -07:00
Andrew Meadows
7f381ac4c4 remove unused variables 2016-09-15 15:33:04 -07:00
Andrew Meadows
83157b573a measure max hips offset and clamp it in IK 2016-09-15 14:55:04 -07:00
Andrew Meadows
5c3da41067 fix windows build 2016-09-15 14:54:03 -07:00
Andrew Meadows
821570fa76 fix Windows build and minor format/namechange 2016-09-15 09:32:03 -07:00
Seth Alves
4470338663 catagorize some qDebugs 2016-09-14 21:39:45 -07:00
Andrew Meadows
d444603a54 simplified Aabb management for GhostObject 2016-09-14 14:57:47 -07:00
Andrew Meadows
418271e06b ghost tracks the collision group 2016-09-14 11:49:00 -07:00
Andrew Meadows
f5c5c68937 adding kinematic character controller demo 2016-09-14 11:43:52 -07:00
Seth Alves
e5e9bb0052 Merge branch 'master' of github.com:highfidelity/hifi into grab-point-adjustments 2016-09-14 11:28:10 -07:00
Andrew Meadows
954d690b8a expose setting avatar collisionless 2016-09-12 16:24:08 -07:00