Commit graph

1038 commits

Author SHA1 Message Date
Andrew Meadows
1ed76ae442 added virtual ObjectMotionState::setShape() 2016-08-24 22:25:45 -07:00
Andrew Meadows
cbacb02010 more unit tests for CollisionRenderMeshCache 2016-08-24 22:25:45 -07:00
Andrew Meadows
b79af55e16 fix ref accounting for garbage collection 2016-08-24 22:25:45 -07:00
Andrew Meadows
06d40afeac don't forget to use the transform of child shapes 2016-08-24 22:25:45 -07:00
Andrew Meadows
1e95e489cb make mesh around btConvexShape, copy to model::Mesh 2016-08-24 22:25:45 -07:00
Andrew Meadows
d0295f3876 remove cruft include 2016-08-24 22:25:45 -07:00
Andrew Meadows
d59c997e64 remove stubbery, make physics lib depend on model 2016-08-24 22:25:45 -07:00
Andrew Meadows
8d3f592e68 rename class to be more correct 2016-08-24 22:25:45 -07:00
Andrew Meadows
9f26836b43 added basic CollisionGeometryCache container 2016-08-24 22:25:45 -07:00
Andrew Meadows
e086792eac enforce coding standards 2016-08-24 22:25:45 -07:00
Brad Hefta-Gaub
0397c6b6ca Merge pull request #8471 from AndrewMeadows/dont-assert-on-bad-data
workaround bad FBXMesh data rather than assert
2016-08-22 14:21:48 -07:00
Andrew Meadows
304c313db7 minor cleanup 2016-08-19 10:15:30 -07:00
Andrew Meadows
6446c7c302 make createShapeFromInfo() fail gently on bad data 2016-08-18 11:49:15 -07:00
Seth Alves
87dbfa7e47 add -Wsuggest-override to compile flags and deal with fallout 2016-08-18 09:51:41 -07:00
Seth Alves
aeadbda1e1 adjust ground-to-fly logic 2016-08-04 11:34:42 -07:00
Seth Alves
e1c7ced652 increase GROUND_TO_AUTOFLY_THRESHOLD 2016-08-04 09:54:26 -07:00
Seth Alves
78e59106b4 adjust threshold for how far above the ground will cause the avatar to auto-fly 2016-08-03 15:21:49 -07:00
Ryan Downe Karpf
91714aaca6 Merge pull request #8258 from AlexanderOtavka/edit-model-ui
Edit model dialog improvements
2016-07-22 17:11:52 -07:00
Andrew Meadows
22e7e150fc remove debug cruft 2016-07-19 18:01:06 -07:00
Seth Alves
56726183f6 clear internal bullet flag before switching entity to kinematic 2016-07-19 16:45:57 -07:00
Andrew Meadows
72175ae09e fix warnings about implicit casts 2016-07-09 22:55:55 -07:00
Andrew Meadows
207ddcea38 wrap hull about each mesh part 2016-07-09 22:25:28 -07:00
Andrew Meadows
97fc5ac3b8 construct Bullet shapes for new shape types 2016-07-06 10:51:28 -07:00
Andrew Meadows
e538625fe0 fix warning about convex hull vertex count cap 2016-06-28 16:35:32 -07:00
Brad Hefta-Gaub
da74114b32 Merge pull request #8070 from AndrewMeadows/triangle-soup-4
support btBvhTriangleMeshShape for static mesh entities
2016-06-23 12:17:32 -07:00
Andrew Meadows
4c9ec7ca43 protect physics against bad entity properties 2016-06-21 13:55:11 -07:00
Andrew Meadows
937bd0c1be SHAPE_TYPE_MESH --> SHAPE_TYPE_STATIC_MESH 2016-06-21 13:54:21 -07:00
Andrew Meadows
31706a3909 force activate kinmatic objects when necessary 2016-06-21 10:38:44 -07:00
Andrew Meadows
a519b77ae7 add SHAPE_TYPE_MESH and build mesh shapes 2016-06-20 17:29:20 -07:00
Andrew Meadows
13bb174b8b small change to commented out debug code 2016-06-20 17:29:20 -07:00
Andrew Meadows
d64729372a ShapeInfo name changes 2016-06-20 17:29:20 -07:00
Seth Alves
eba518cb65 try to make code that converts bullet-calculated values to parent-frame values more effecient 2016-06-13 14:26:41 -07:00
Seth Alves
52245f25f2 rework code that transforms global _server* values into parent-frame values 2016-06-13 11:48:45 -07:00
Seth Alves
41c399897a remove some debug prints 2016-06-10 12:08:13 -07:00
Seth Alves
e1ae2a193f EntityMotionState now uses parent-relative position and rotation and velocity when deciding if it needs to send an edit packet to the entity-server 2016-06-10 11:49:15 -07:00
Seth Alves
5650ef9d52 have code where physics guesses at server values also avoid doing simple simulation of children of avatars 2016-06-09 14:35:17 -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
Andrew Meadows
3280a2b967 fix indentation 2016-06-03 10:47:54 -07:00
Andrew Meadows
f17330ea82 diff method for capping convex hull point count 2016-06-03 10:47:54 -07:00
Atlante45
3ca158265a Make sure getVelocityChange returns the velocityChange 2016-06-02 16:44:13 -07:00
Seth Alves
f91a2403be merge from upstream 2016-05-20 17:07:34 -07:00
Brad Hefta-Gaub
18613908df Merge pull request #7800 from sethalves/no-fly-zones
No fly zones
2016-05-20 16:59:55 -07:00
Andrew Meadows
2e30f0916c remove debug logging and add some comments 2016-05-20 15:07:47 -07:00
Andrew Meadows
83b8ef8131 clean up stream formatting of vec3 and friends 2016-05-20 09:41:26 -07:00
Andrew Meadows
5a826d696a cleanup after code review 2016-05-20 09:41:26 -07:00
Andrew Meadows
9fae1a7edd tweak log format 2016-05-20 09:41:26 -07:00
Andrew Meadows
7866fcf78c trim high-point convex hulls 2016-05-20 09:41:26 -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
Andrew Meadows
9786c0bfd3 remove warning about signed/unsigned conversion 2016-05-17 15:34:09 -07:00
Andrew Meadows
aab26c5089 disable DEBUG_STATE_CHANGE 2016-05-17 15:14:36 -07:00
Andrew Meadows
2f39968a03 remove debug cruft 2016-05-17 14:32:20 -07:00
Andrew Meadows
e4cb6e2b87 order-independent CharacterController motors 2016-05-17 14:02:49 -07:00
Andrew Meadows
1749bfbc58 transition to InAir state when not thrusting up 2016-05-17 14:02:47 -07:00
Andrew Meadows
9b7bf97891 enable vertical thrust while walking 2016-05-17 14:02:46 -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
ac506dc4b7 where needed, copy clientOnly into properties before calling queueEditEntityMessage 2016-05-11 12:46:16 -07:00
Seth Alves
144715f00c don't make changes to other avatar's avatarEntities 2016-05-10 16:05:40 -07:00
Seth Alves
f90b9ec65d Merge branch 'master' of github.com:highfidelity/hifi into avatar-entities-3 2016-05-10 12:08:45 -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
Seth Alves
b761ecf44f merge from upstream 2016-05-10 08:18:45 -07:00
Andrew Meadows
ffc3123467 Merge pull request #7658 from sethalves/grab-fixes
Grab fixes
2016-05-09 15:30:37 -07:00
Brad Hefta-Gaub
2c0204b0d6 Merge pull request #7821 from Atlante45/fix/collision-sound
Fix avatar/entity collision sound
2016-05-09 14:24:19 -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
Seth Alves
a0771f8ee5 use smart pointers for entity simulations 2016-05-07 09:14:33 -07:00
Seth Alves
f80333ee9e fix indentation, move an early exit to earlier 2016-05-06 10:06:51 -07:00
Seth Alves
71738d4841 Merge branch 'master' of github.com:highfidelity/hifi into grab-fixes 2016-05-06 09:59:17 -07:00
Atlante45
f65b15803a Fix potential iterator invalidation 2016-05-05 15:04:39 -07:00
Atlante45
bc6544a3c5 Fix MyAvatar's velocity change 2016-05-05 14:55:28 -07:00
Seth Alves
0c794cac5d Merge branch 'master' of github.com:highfidelity/hifi into grab-fixes 2016-05-05 10:13:07 -07:00
Andrew Meadows
3202a723b8 remove warning about unused variable 2016-05-05 08:54:09 -07:00
Seth Alves
d76b8f2335 action->locallyAddedButNotYetReceived is unneeded with isMine available 2016-05-05 06:44:52 -07:00
Andrew Meadows
be9a572fb0 fix grab motion glitch on long-ping connections 2016-05-04 16:50:42 -07:00
Seth Alves
9db839bc13 don't allow someone else to delete an action that I own. reset dynamic property when releasing and entity, even if refCount isn't 0 2016-05-04 15:01:00 -07:00
Seth Alves
b6918f59a6 remove extra qualification 2016-05-04 11:33:41 -07:00
Seth Alves
44beca1687 try having all spring derived actions agree on a target 2016-05-04 11:29:17 -07:00
Seth Alves
ef85cc7803 hook up zone flyingAllowed flag to character controller 2016-05-01 14:47:12 -07:00
Brad Hefta-Gaub
04dab65b59 Merge pull request #7727 from ZappoMan/supportLargeClockSkew
support for larger than 35 minute clock skew
2016-04-23 08:42:38 -07:00
Andrew Meadows
2bd83764e7 remove some debug cruft 2016-04-22 09:38:43 -07:00
Andrew Meadows
872622c6f7 fix acceleration of for server-side kinematics 2016-04-22 09:38:43 -07:00
Andrew Meadows
a3c66d8c91 reduce number of updates for fast-moving objects 2016-04-22 09:38:43 -07:00
Andrew Meadows
a79f49a5cd don't stop slow kinematic objs when sending updates 2016-04-22 09:38:43 -07:00
Andrew Meadows
afcf6d68a7 move deactivation thresholds to shared header 2016-04-22 09:38:43 -07:00
Andrew Meadows
ad045bc439 remove second-order term from kinematic motion 2016-04-22 09:38:43 -07:00
Andrew Meadows
8cbec06616 fix bug where kinematic objs pop on first step 2016-04-22 09:38:43 -07:00
Andrew Meadows
3639ffe53e optimize kinematic motion math 2016-04-22 09:38:43 -07:00
Andrew Meadows
771727890c more finely grained Bullet profiling 2016-04-22 09:38:43 -07:00
Brad Hefta-Gaub
5244274ae4 fix warning 2016-04-20 19:06:31 -07:00
Brad Hefta-Gaub
31f9d592e0 support for larger than 35 minute clock skew 2016-04-20 18:42:00 -07:00
Anthony J. Thibault
0b7a5c4df8 CharacterController: leak fix for btRigidBody and it's shape 2016-04-15 15:05:54 -07:00
Andrew Meadows
bb59860cfe update Aabb's of static objects when they move 2016-04-14 11:18:10 -07:00
Andrew Meadows
dcf28937cf cleanup cached Physics::sessionUUID 2016-04-14 11:18:10 -07:00
Seth Alves
43f735dd21 avoid loop where bullet moves an entity and then an entity tells bullet that it has moved. 2016-04-09 22:18:43 -07:00
Seth Alves
af05b97c1e put back accidently deleted line. cleanups 2016-04-04 17:31:59 -07:00
Seth Alves
d814d7b35d merge from upstream 2016-04-04 16:32:49 -07:00
Seth Alves
69bb0ebd74 Revert "faster kinematic motion for entities" 2016-04-04 16:11:54 -07:00
Seth Alves
b8587e0711 update collision shapes of entities which are children of avatars 2016-04-04 16:06:53 -07:00
Andrew Meadows
7ea81f3937 add and fix comments 2016-04-03 19:15:01 -07:00
Andrew Meadows
20914df330 fix warning about signed/unsigned comparison 2016-04-01 13:31:14 -07:00
Andrew Meadows
25fbf926df CollisionWorld only updates _active_ Aabbs
we manually set/clear active state of static objects
  that need their Aabbs updated
also fixing a bug when starting kinematic motion
2016-04-01 13:14:03 -07:00
Andrew Meadows
3f52d237ed adding Bullet profiler instances for better stats 2016-04-01 13:14:03 -07:00
Andrew Meadows
ac5c055a1e don't verify simulated bit when adding to delete list 2016-03-24 21:12:22 -07:00
Andrew Meadows
ecfe198e35 patch btCompoundShape memory leak 2016-03-23 14:39:49 -07:00
Andrew Meadows
119ef24d5d cleanup ShapeManager API and fix bitrot in tests 2016-03-23 14:39:49 -07:00
Anthony J. Thibault
4a78300607 MyAvatar: Allow user to raise hands directly overhead.
Previously we were using a infinitely tall vertical cylinder
to push hand IK targets out of the body, this had the
side-effect of preventing the hands from being raised over
the head.  Now, we collide against the same 3d capsule
used by the physics system for avatar collisions.
2016-03-10 10:20:17 -08:00
Andrew Meadows
4ae94c0611 fine tuning for when to make simulation bid 2016-03-09 13:06:34 -08:00
Andrew Meadows
9157ff6eda more correct notion of desired simulation priority 2016-03-09 11:02:50 -08:00
Andrew Meadows
99a1310711 change properties at 127 priority, grab at 128 2016-03-08 22:17:44 -08:00
Seth Alves
dcb720a832 fix polyvox hull when registration changes. 2016-03-06 14:09:45 -08:00
Seth Alves
59804a0f54 cleanups 2016-03-06 12:59:41 -08:00
Seth Alves
5241dc5394 this seems to be working now. more cleanups to come 2016-03-06 12:59:33 -08:00
Andrew Meadows
b4edfe2390 no expiry for simulation ownership 2016-02-25 12:07:20 -08:00
Anthony J. Thibault
73ac47724a Rig: Prevent the hand IK targets from entering the body.
Use a 2d circle/circle intersection test to keep the hands outside of the body.
2016-02-17 16:23:18 -08:00
Andrew Meadows
2b91a31919 check for nullptr to avoid crashes 2016-02-11 13:53:01 -08:00
Chris Collins
a4afa03fe5 Merge pull request #7077 from sethalves/clean-up-grab-signaling
Clean up grab signaling + various fixes
2016-02-11 10:20:56 -08:00
Seth Alves
6a646f1c24 put isMoving back and change all uses to isMovingRelativeToParent 2016-02-10 19:01:41 -08:00
Andrew Meadows
ac60917b54 sigh... protect againt null MotionStates 2016-02-10 17:58:38 -08:00
Andrew Meadows
fed03edde3 manually removing contact manifolds was a bad idea 2016-02-10 17:58:38 -08:00
Andrew Meadows
532f0683e8 remove all contact info before removing objects 2016-02-10 17:58:38 -08:00
Andrew Meadows
84fb983da7 don't forget to remove from _outgoingChanges 2016-02-10 10:36:35 -08:00
Andrew Meadows
4bcb7b1ba9 more correct profiling 2016-02-10 10:36:34 -08:00
Andrew Meadows
9b467e94da constify and explicit override 2016-02-10 10:36:34 -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
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
eb1c159c7e only setLastEdited on properties to be sent 2016-02-08 15:16:04 -08:00
Seth Alves
5b5ddebb1a set last-edited when updating a child's queryAACube 2016-02-08 15:09:51 -08:00
Brad Hefta-Gaub
3f0ebf7732 Merge pull request #7031 from AndrewMeadows/simulation-ownership
server can clear simulation ownership
2016-02-06 19:19:39 -08:00
Anthony J. Thibault
f13e31c7fc CharacterController: removed unnecessary code. 2016-02-05 10:53:58 -08:00
Anthony J. Thibault
8ca8550f26 MyAvatar: Standing Takeoff and In-Air Animations
Now there are two sets of of jump takeoff and in-air animations.
* Run - Used when the character jumps or falls with a small forward velocity.
* Standing - Used when the character jumps or falls in-place or backward.

CharacterController
* increased takeoff duration to 250 ms
* increased takeoff to fly duration to 1100 ms
* added standing jump and in-air animations
* added 250 milisecond delay between ground and hover, to prevent going into hover when walking over cracks.
* take-off to in-air transitions now use the new snapshotPrev interp type for a smoother tweening.
2016-02-04 17:56:07 -08:00
Andrew Meadows
2da46ff26a server-side release ownership 2016-02-04 13:26:07 -08:00
Andrew Meadows
91a2f86482 update some comments 2016-02-04 13:26:06 -08:00
Andrew Meadows
e51edaa117 update some comments 2016-02-04 13:26:06 -08:00
Andrew Meadows
861082964e Merge pull request #7017 from hyperlogic/tony/fly
MyAvatar: Improved Jump / InAir / Fly behavior
2016-02-03 12:22:30 -08:00
Stephen Birarda
93530fca72 fix the last of the current override warnings for OS X 2016-02-03 11:08:41 -08:00
Anthony J. Thibault
fff603e4e2 Removed comment 2016-02-03 10:21:27 -08: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
8b5cf3e49a CharacterController: refined state machine. 2016-02-02 11:26:17 -08:00
Anthony J. Thibault
47f3ce3786 CharacterController jump is more reliable. 2016-02-02 11:26:16 -08:00
Anthony J. Thibault
2936811484 Added takeoff animation, WIP
Character controller still has some jump/in-air bugs.
2016-02-02 11:26:15 -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
Anthony J. Thibault
e9fd439ffd Added inAir animations 2016-02-02 11:23:46 -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
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
Anthony J. Thibault
bc9621baab CharacterController: Improve ground support detection
In addition to the existing line probe ground check, also check if the bottom sphere of the capsule is contact with any geometry before going into hover mode.
This should prevent going into the fly animation when standing or walking on collision shapes with small gaps between elements.
2016-01-25 21:54:35 -08:00
Andrew Meadows
86162094c1 Merge pull request #6895 from hyperlogic/tony/hmd-recenter-on-rotation
MyAvatar: Recenter when the head turns away from the hips
2016-01-22 14:07:40 -08:00
Andrew Meadows
200676ac68 Merge pull request #6896 from AndrewMeadows/another-crash-fix
fix crash when deleting entities quickly
2016-01-22 14:04:46 -08:00