Commit graph

1333 commits

Author SHA1 Message Date
Eric Levin
2b4d894ab3 moved the type computation inside the while loop so it is correctly computed each iteration 2015-04-17 08:17:58 -07:00
Seth Alves
62a45ccebb re-enable code that gives up simulation ownership 2015-04-16 17:00:36 -07:00
Eric Levin
096f69961a Filtering triggering of collisions with contact type of "continue" 2015-04-16 16:42:28 -07:00
Seth Alves
faf5e7415d don't explicitly release simulator status 2015-04-16 16:32:51 -07:00
Seth Alves
ec26b4595a adjust comment 2015-04-16 16:27:30 -07:00
Seth Alves
f48f9caea4 cut back on debuging prints 2015-04-16 16:18:13 -07:00
Seth Alves
ea8dcfa5b5 read UUIDs as UUIDs rather than as strings. more debugging prints 2015-04-16 15:33:43 -07:00
Seth Alves
d7881f1891 adjust logic for releasing ownership of simulation 2015-04-16 15:15:28 -07:00
Seth Alves
d7059d8f2d add code for uuids in wire protocol. some debugging prints 2015-04-16 14:46:38 -07:00
Andrew Meadows
619d1ba191 rename to measureAcceleration 2015-04-16 14:09:33 -07:00
Andrew Meadows
1acb90e23a merge upstream/master into andrew/isothermal 2015-04-16 13:48:47 -07:00
Andrew Meadows
b7ca69d4e1 fix typo 2015-04-16 13:46:26 -07:00
Andrew Meadows
5180e7e715 measure linear velocity of moving objects 2015-04-16 13:44:17 -07:00
Seth Alves
bce269ada2 Merge branch 'master' of github.com:highfidelity/hifi into acceleration-and-owner-in-wire-protocol 2015-04-16 12:31:25 -07:00
Andrew Meadows
83d54eb46b merge upstream/master into andrew/bispinor 2015-04-16 12:07:22 -07:00
Andrew Meadows
4bef5b7b73 Merge pull request #4638 from Triplelexx/myavatar-targetvelocity
Myavatar targetvelocity
2015-04-15 14:22:02 -07:00
Seth Alves
c87dca5ba0 remove debug print 2015-04-15 11:58:12 -07:00
Seth Alves
51ac44a9b7 try to increase chances the interface gives up simulation ownership 2015-04-15 11:34:42 -07:00
Seth Alves
b21cc357e4 undo stop-sending hack 2015-04-14 16:08:53 -07:00
Seth Alves
2a87eb9ce1 pull from andrew's branch 2015-04-14 15:44:53 -07:00
Andrew Meadows
7da1c51877 whoops, missed a file 2015-04-14 14:55:42 -07:00
Andrew Meadows
da9091a99d remove SHAPE_TYPE_CONVEX_HULL from libs and tests 2015-04-14 14:54:43 -07:00
Seth Alves
e25590f00e don't give up ownership of simulation until the last packet is sent 2015-04-14 13:37:57 -07:00
Seth Alves
3cf31ff701 fix to allow modelEntityItems with shape of box into physicsengine. ignore entity updates echoed back to us. stop broadcasting after 3 non-moving updates 2015-04-14 13:32:02 -07:00
Seth Alves
d330319ed9 when a script creates and object, set the local Node as the simulation owner 2015-04-14 09:56:39 -07:00
Seth Alves
de2e5ae718 adjust logic for when to claim or release simulator status 2015-04-14 09:00:48 -07:00
Andrew Meadows
abb40ca080 cleanup: split stats dump out of stepSimulation 2015-04-14 09:00:36 -07:00
Seth Alves
05ef357854 debug prints 2015-04-13 16:47:06 -07:00
Seth Alves
256a7f5198 try different login for deciding when to update/clear simulatorID 2015-04-13 16:37:44 -07:00
Seth Alves
4677324a87 try different login for deciding when to update/clear simulatorID 2015-04-13 16:30:16 -07:00
Seth Alves
a30e807051 get rid of unneeded updateSimulatorID, set changed simulator id in properties so it gets included in outgoing packet 2015-04-13 16:20:30 -07:00
Triplelexx
d2b643d389 Add targetVelocity into MyAvatar simulation
MyAvatar sets a target velocity to achieve, this is parsed in the
preSimulation controller step.
2015-04-13 23:57:08 +01:00
Seth Alves
396f6b1987 mess with debugging prints 2015-04-13 15:22:54 -07:00
Andrew Meadows
86f89a1d6f fix bug where fly speed is limited to walk speed 2015-04-13 13:23:15 -07:00
Seth Alves
9c2fec36fd adjust debugging, try a different DIRTY flag 2015-04-13 12:52:31 -07:00
Seth Alves
f42a43e180 cause changes to _simulatorID to be broadcast 2015-04-13 12:39:40 -07:00
Seth Alves
eace91e833 if an entity is being moved and has no sim-id, set sim-id to local node-id. if it has a sim-id, and it's not the same as the local node's, don't broadcast the change 2015-04-13 12:25:44 -07:00
Seth Alves
e2af93db5f some debugging 2015-04-13 11:38:30 -07:00
Seth Alves
4ada3fc9a4 don't keep large things out of physics engine 2015-04-09 15:12:51 -07:00
Andrew Meadows
2ccc25e380 remove old kinematic CharacterController 2015-04-07 16:29:52 -07:00
Andrew Meadows
40c94fa00e merge upstream/master into andrew/isentropic 2015-04-07 16:23:38 -07:00
Andrew Meadows
d9146b1033 jump to hover works again 2015-04-07 16:23:06 -07:00
Andrew Meadows
b5f0c57dd1 jumping and hovering works with dynamic controller 2015-04-07 15:07:46 -07:00
Seth Alves
ef5dffecf6 fix filenames in comments 2015-04-07 10:03:14 -07:00
Seth Alves
9014397167 try again without macro 2015-04-07 09:59:04 -07:00
Seth Alves
55bab2efd6 put physics into its own logging group 2015-04-06 18:09:45 -07:00
Andrew Meadows
e2ea940249 more cleanup 2015-04-06 16:21:04 -07:00
Andrew Meadows
23951620bb cleanup DynamicCharacterController 2015-04-06 16:19:14 -07:00
Andrew Meadows
435ce106eb Add DynamicCharacterController prototype 2015-04-06 16:03:13 -07:00
Andrew Meadows
568050686d replace tabs with spaces for indentation 2015-04-04 13:50:16 -07:00
Andrew Meadows
27d6d9f720 add Bullet profiling hooks for physics simulation 2015-04-02 15:20:16 -07:00
Andrew Meadows
f4f219ca36 tweak jump velocity and hover transition 2015-04-02 09:03:33 -07:00
Andrew Meadows
f804b2311d remove hover-friendly behavior 2015-04-02 08:40:47 -07:00
Andrew Meadows
b37384d759 exit hover now not quite automatic when over floor
remove MyAvatar::jump() method for more general API
2015-04-01 15:13:27 -07:00
Andrew Meadows
0249b8c9c5 fix backwards comparison logic 2015-04-01 13:56:05 -07:00
Andrew Meadows
e27f800c75 Merge pull request #4561 from sethalves/island
scaling hints to hash, larger collision shapes
2015-04-01 09:40:18 -07:00
Philip Rosedale
8114fdd1e2 move button locations, names some constants in avatar controller 2015-03-31 21:51:50 -07:00
Seth Alves
859628a4fd fix comment 2015-03-31 17:20:16 -07:00
Seth Alves
164e5ff816 Merge branch 'master' of github.com:highfidelity/hifi into island 2015-03-31 17:00:48 -07:00
Seth Alves
05cb0b830c make max collision size be 1000x1000x1000 rather than 100x100x100 2015-03-31 16:59:43 -07:00
Philip Rosedale
9635c6d248 Merge branch 'master' of https://github.com/worklist/hifi 2015-03-31 16:29:55 -07:00
Philip Rosedale
b7f0be761c gun buildings fall on creation, dice stops correctly 2015-03-31 16:27:09 -07:00
Andrew Meadows
9739d68370 fix typo that broke avatar motion 2015-03-31 13:20:06 -07:00
andrew
a2b5fdb540 merge 2015-03-31 09:28:23 -07:00
andrew
fdfb8bd1b4 fix intermittent crash on windows during login 2015-03-31 09:26:33 -07:00
Andrew Meadows
94c1cf12f5 deleting _dynamicsWorld doesn't crash on shutdown 2015-03-30 17:12:19 -07:00
Philip Rosedale
f116ac131d Merge pull request #4532 from AndrewMeadows/inertia
fix crash in PhysicsEngine on shutdown
2015-03-30 16:31:34 -07:00
Andrew Meadows
c6b34df06c unlock after character is properly updated 2015-03-30 16:07:56 -07:00
Seth Alves
ee7247a5b4 fix a couple of crashes 2015-03-30 15:56:01 -07:00
Andrew Meadows
9b13f186e3 remove character from PhysicsEngine on shutdown 2015-03-30 15:51:58 -07:00
Andrew Meadows
10af59296d Merge pull request #4499 from sethalves/multi-hull-collisions
Multi hull collisions
2015-03-30 12:11:56 -07:00
Andrew Meadows
2404fb126f Merge pull request #4527 from sethalves/valgrind
Valgrind told me to do it
2015-03-30 11:56:17 -07:00
Seth Alves
e730109c51 quiet debuging spew 2015-03-30 11:46:48 -07:00
Andrew Meadows
da9ceac9ae fix crash for bad avatar body on login 2015-03-30 11:06:02 -07:00
Andrew Meadows
adf076a630 optimizations when creating convex hull shapes 2015-03-30 09:56:30 -07:00
Seth Alves
7137b41375 free these so it's easier to see other leaks in valgrind 2015-03-30 09:30:37 -07:00
Seth Alves
1e166eef0f valgrind says _ghostObject is used before it's initialized 2015-03-28 17:12:55 -07:00
Seth Alves
90f51e7d4c print a warning when ShapeManager is skipping over a too-large or too-small shape 2015-03-27 16:15:54 -07:00
Seth Alves
fd69a54f10 Merge branch 'master' of github.com:highfidelity/hifi into multi-hull-collisions 2015-03-27 15:55:20 -07:00
Andrew Meadows
bee8c0e237 "hover" if the "jump" key is held down long enough 2015-03-27 13:56:03 -07:00
Andrew Meadows
be5fdbf217 enable avatar collisions by default
also remove old gravity features
2015-03-27 13:36:20 -07:00
Andrew Meadows
821ac605f5 smoother motion on steps
faster motion when "flying"
cleanup of MyAvatar::updatePosition()
2015-03-26 19:48:52 -07:00
Andrew Meadows
8a951e0dd3 minor cleanup 2015-03-26 15:16:57 -07:00
Andrew Meadows
0ef4022e94 tweak gravity and step heights of controller 2015-03-26 15:14:46 -07:00
Seth Alves
212f564131 Merge branch 'master' of github.com:highfidelity/hifi into multi-hull-collisions 2015-03-26 13:08:44 -07:00
Andrew Meadows
429a258df0 enable hover when far above floor 2015-03-25 14:38:27 -07:00
Andrew Meadows
2440c47648 remove extra whitespace 2015-03-25 11:06:19 -07:00
Andrew Meadows
2128f21308 only set ADD bit with UPDATE_SHAPE when enabled 2015-03-25 11:02:48 -07:00
Andrew Meadows
674b2c97a2 added comments to zlib license 2015-03-25 08:53:33 -07:00
Seth Alves
719dae61a9 when a compound shape is deleted, delete the children, as well 2015-03-25 06:51:00 -07:00
Andrew Meadows
430158c109 updateShapeIfNecessary() is a more correct name 2015-03-24 23:35:09 -07:00
Andrew Meadows
d497620976 avatar can jump with E key when walking 2015-03-24 23:05:46 -07:00
Andrew Meadows
44eca08fa4 PhysicsEngine doesn't need AvatarData
MyAvatar now owns its CharacterController
fix for bug of phantom collision obj when avatar's physics are disabled
2015-03-24 17:38:35 -07:00
Seth Alves
2f47f7c7ba diff minimization 2015-03-24 16:51:42 -07:00
Seth Alves
8d2c942509 diff minimization 2015-03-24 16:38:11 -07:00
Seth Alves
1eeb2e89f8 remove some debug spam 2015-03-24 16:23:51 -07:00
Seth Alves
6e3be26013 attempting to figure out why physics motion object doesn't get updated when collision model url changes 2015-03-24 15:28:21 -07:00
Seth Alves
bb8c83d49a Merge branch 'master' of github.com:highfidelity/hifi into multi-hull-collisions 2015-03-23 18:26:11 -07:00
Seth Alves
c8ad82917e clean up some debugging spew. take dimensions into account when scaling points used for collision hull creation 2015-03-23 16:54:36 -07:00
Seth Alves
f31ac8b968 compound covex hull collisions work 2015-03-23 15:10:28 -07:00
Seth Alves
bfc5cf99d6 more code for compound hull collisions 2015-03-21 16:11:47 -07:00
Seth Alves
86d09a1607 more compound shape stuff 2015-03-21 08:55:49 -07:00
Andrew Meadows
49f5de2b94 make character's "up" axis depend on orientation 2015-03-20 16:39:38 -07:00
Seth Alves
769194f046 first stab at compound hull collisions 2015-03-20 13:41:14 -07:00
Andrew Meadows
0164de80fe apply coding standard to CharacterController 2015-03-20 13:19:24 -07:00
Andrew Meadows
6454149536 formatting and comments 2015-03-20 12:45:29 -07:00
Andrew Meadows
ab9d8eb345 reorder arguments to StepDownConvexResultCallback ctor 2015-03-20 08:42:35 -07:00
Andrew Meadows
90a8844738 merge upstream/master into andrew/bispinor
Conflicts:
	libraries/physics/src/PhysicsEngine.cpp
2015-03-19 16:18:52 -07:00
Andrew Meadows
3cd2ce82d4 tuning character so it can walk up ledges 2015-03-19 15:31:34 -07:00
Seth Alves
480eae7317 Merge branch 'master' of github.com:highfidelity/hifi into avatars-can-collide 2015-03-19 09:14:26 -07:00
Brad Davis
91906d619f Removing unmatched QReadWriteLock::unlock() call 2015-03-18 22:32:06 -07:00
Andrew Meadows
c032b29633 proper shape management for ConvexHull shapes 2015-03-18 16:29:57 -07:00
Seth Alves
e2a104c38a unjack AvatarData locks 2015-03-18 14:11:02 -07:00
Seth Alves
dd97b54e52 quiet physics log spam 2015-03-18 13:22:29 -07:00
Seth Alves
1cab14064d remove unneeded code, quiet some debug spew 2015-03-18 13:10:53 -07:00
Andrew Meadows
8eec83c144 comments and formatting 2015-03-17 22:28:38 -07:00
Seth Alves
2dd75fef2c remove some unneeded Q_OBJECT macros, diff minimization 2015-03-17 19:12:26 -07:00
Andrew Meadows
180d147806 merge upstream/master into andrew/isentropic 2015-03-17 15:59:09 -07:00
Seth Alves
222c3f01eb minor cleanups, diff minimization 2015-03-17 14:24:46 -07:00
Andrew Meadows
9ea13fac37 cleanup formatting 2015-03-17 09:01:36 -07:00
Andrew Meadows
b4263cd2eb allow objs to collide agains char controller
but char controller only responds to penetration when enabled
2015-03-16 17:10:49 -07:00
Seth Alves
b76103edb0 clean up debugging spew 2015-03-16 16:44:29 -07:00
Andrew Meadows
78b614f855 move avatar details into CharacterController 2015-03-16 16:24:32 -07:00
Seth Alves
08cb13640c debugging spew 2015-03-16 11:22:42 -07:00
Seth Alves
59e4efa651 debugging prints around a deadlock 2015-03-15 07:10:43 -07:00
Seth Alves
250567e315 formatting, diff minimization 2015-03-14 12:09:23 -07:00
Seth Alves
b815c365eb formatting 2015-03-13 18:57:27 -07:00
Seth Alves
f7f75cabf4 formatting 2015-03-13 18:49:48 -07:00
Seth Alves
87cc710efc more merge madness, calculate 2nd PhysicsEngine hash with qChecksum if url is set 2015-03-13 18:43:24 -07:00
Seth Alves
a5cdc3c68b still recovering from troubled merge 2015-03-13 18:27:52 -07:00
Seth Alves
c24ea023f6 still recovering from troubled merge 2015-03-13 18:26:09 -07:00
Seth Alves
af2c00b235 still recovering from troubled merge 2015-03-13 18:21:59 -07:00
Seth Alves
8481a65fbb still recovering from troubled merge 2015-03-13 18:21:30 -07:00
Seth Alves
2345e5a4f9 oops 2015-03-13 18:19:49 -07:00
Seth Alves
7230257b9e oops 2015-03-13 18:08:58 -07:00
Seth Alves
50798398ff merge from upstream 2015-03-13 18:04:55 -07:00
Philip Rosedale
6a4dbd35b5 Merge pull request #4449 from AndrewMeadows/thermonuclear
ShapeManager can release shape by pointer
2015-03-13 17:34:32 -07:00
Andrew Meadows
e4c6d49c4d ShapeManager can release shape by pointer 2015-03-13 16:36:18 -07:00
Seth Alves
2368e6e5b7 collision with a hull sort of works. there is a new memory corruption problem 2015-03-13 15:41:57 -07:00
Andrew Meadows
99e2d799c5 correct math for capsule halfHeight 2015-03-13 09:40:32 -07:00
Seth Alves
89b58e2681 trying to get loaded callback for model hooked up to PhysicsEngine 2015-03-13 09:11:15 -07:00
Andrew Meadows
be252147e2 merge upstream/master into andrew/isentropic 2015-03-12 16:38:59 -07:00
Seth Alves
a945421d9d still trying to make PhysicsEngine::addEntityInternal be async 2015-03-12 16:38:55 -07:00
Andrew Meadows
a1a12465da able to update avatar controller in PhysicsEngine 2015-03-12 16:36:41 -07:00
Seth Alves
4b1fc4fa10 merge from upstream 2015-03-12 15:59:37 -07:00
Seth Alves
2cf0e1ab25 break PhysicsEngine::addEntityInternal in half, making the 2nd part asynch. This is to allow a ModelEntityItem time to download its collision hull before the 2nd part runs 2015-03-12 15:58:09 -07:00
Stephen Birarda
471e55c8ce fix some lingering warnings 2015-03-12 12:36:39 -07:00
Seth Alves
bf1cb951a3 move PhysicsEntity so that ModelEntityItem can initiate a model download 2015-03-11 18:34:27 -07:00
Seth Alves
df29d5365a Merge branch 'master' of github.com:highfidelity/hifi into avatars-can-collide 2015-03-11 15:18:55 -07:00
Andrew Meadows
feafa0a60b remove old Ragdoll and avatar interactions 2015-03-11 14:29:03 -07:00
Seth Alves
3a3e723f4e trying to figureo out where to download hull models 2015-03-11 14:26:30 -07:00
Seth Alves
20a22ff42c Merge branch 'master' of github.com:highfidelity/hifi into avatars-can-collide 2015-03-11 07:17:19 -07:00
Seth Alves
1c73f50dbc started to hook up geometry downloader to ShapeInfo 2015-03-11 07:17:13 -07:00
Brad Hefta-Gaub
77eae204cf Merge pull request #4411 from AndrewMeadows/thermonuclear
fix for crash when deleting physical entity that departs the domain
2015-03-10 16:43:17 -07:00
Seth Alves
844085b514 started on hull collisions 2015-03-10 15:30:08 -07:00
Virendra Singh
a0e7125e11 code revamp and correction in parallel axis theorem 2015-03-11 03:11:17 +05:30
Andrew Meadows
3d531e8304 add f at end of float literal 2015-03-10 14:24:49 -07:00
Virendra Singh
ce4226d6b9 Merge branch 'master' of git://github.com/highfidelity/hifi into 20304 2015-03-10 22:36:18 +05:30
Andrew Meadows
fd76eda383 slightly better hardcoded size for avatar capsule
we'll be measuring avatar dimensions more correctly soon
2015-03-09 17:59:45 -07:00
Andrew Meadows
3c05d685d7 avoid assert for zero-length character velocity 2015-03-09 17:37:34 -07:00
Seth Alves
ab8784f1b4 add comment about character capsule being hard-coded 2015-03-09 13:51:08 -07:00
Seth Alves
99300a5bc8 merge from master 2015-03-09 13:39:51 -07:00
Seth Alves
b2cfed8bca removed unused blob of code 2015-03-08 09:04:00 -07:00
Andrew Meadows
f5352333f0 entities use radians per second for angular velocity 2015-03-06 16:42:06 -08:00
Andrew Meadows
373be95297 entity cubes are in meters 2015-03-06 15:32:03 -08:00
Virendra Singh
84e05e361e Accuracy improved to 0.01 2015-03-06 22:07:35 +05:30
Virendra Singh
42867bf98d code revamp 2015-03-06 11:10:38 +05:30
Seth Alves
ac0c4e8512 cap max speed at MAX_WALKING_SPEED 2015-03-04 19:57:06 -08:00
Seth Alves
a8b688d540 move _velocity into base class. walking on a cube works 2015-03-04 15:26:02 -08:00
Seth Alves
b4998e9c53 falling onto an object works 2015-03-04 08:48:48 -08:00
Virendra Singh
4366525da4 Removed unused variables 2015-03-04 08:51:44 +05:30
Virendra Singh
1facbbb844 Removed MSVC specific for each blocks 2015-03-04 08:21:39 +05:30
Seth Alves
8eec66c066 merge upstream, avatar can now fall onto a cube 2015-03-03 18:37:16 -08:00
Seth Alves
7e4b597ca3 keep physics specific code in PhysicsEngine 2015-03-03 15:45:10 -08:00
Seth Alves
5d4ef8d5b8 initial flailing 2015-03-03 14:30:26 -08:00
Virendra Singh
4627d2e7b5 Parallel axis theorem correction 2015-03-04 03:52:59 +05:30
Virendra Singh
7a129235c2 Mass properties unit tests 2015-03-04 01:12:20 +05:30
Virendra Singh
3d558dae64 MassProperties of a 3D mesh 2015-03-03 01:51:35 +05:30
Philip Rosedale
c2e559342a Merge pull request #4341 from AndrewMeadows/bispinor
load non-moving dynamic objects as "inactive" in physics engine
2015-02-26 09:21:49 -08:00
Andrew Meadows
5776df1012 load dynamic obj as inactive when not moving 2015-02-25 12:07:19 -08:00
Stephen Birarda
6b08b2993a fix for bullet system include to silence warnings 2015-02-19 13:03:16 -08:00
Stephen Birarda
70a89680f5 fix bullet include to match previous format 2015-02-19 12:04:41 -08:00
Stephen Birarda
6f055ca0d7 add an external project to handle bullet 2015-02-19 12:01:40 -08:00
Stephen Birarda
b2e587dbbd remove use of include_dependency_includes and use cmake 2015-02-18 14:12:05 -08:00
Stephen Birarda
e99012efbb updates to build guides to remove soxr 2015-02-17 10:33:12 -08:00
Stephen Birarda
8c998a65ee use the glm find_package and check externals 2015-02-13 12:50:32 -08:00
Stephen Birarda
d7ce10dedb use external project glm for physics library 2015-02-13 10:33:35 -08:00
Andrew Meadows
f4a4c9786c don't create shape for SHAPE_TYPE_NONE 2015-02-11 08:43:55 -08:00
Andrew Meadows
3239c259f9 remove commented out cruft 2015-02-11 08:43:19 -08:00
Andrew Meadows
e6a6946027 merge upstream/master into andrew/thermonuclear 2015-02-09 12:44:52 -08:00
Andrew Meadows
0ef5d42a5b unit tests support new ShapeInfo API 2015-02-08 15:13:21 -08:00
Andrew Meadows
12a7021bb5 ShapeInfo computs own DoubleHashKey, gets new API 2015-02-08 15:12:44 -08:00
Andrew Meadows
b4da2ddd52 fix physics crash on disconnect from domainserver 2015-02-05 09:13:32 -08:00
Andrew Meadows
28a3c3f469 separate new shape types from legacy 2015-02-03 08:34:06 -08:00
Andrew Meadows
58bb137c4d bulletRotationStep --> computeBulletRotationStep 2015-01-27 17:37:12 -08:00
Andrew Meadows
23bd3f90d9 Bullet-style rotation integration for kinematics
and for dead reckoning after wire-transfer
2015-01-27 17:27:15 -08:00
Andrew Meadows
d1cf6559c5 merge upstream/master into andrew/isentropic
Conflicts:
	libraries/physics/src/ObjectMotionState.cpp
2015-01-27 16:24:11 -08:00
Andrew Meadows
d5c0c200de optimization for when physics engine doesn't step 2015-01-27 15:54:32 -08:00
Andrew Meadows
aebdd3b335 fix bad extrapolation of rapidly spinning objects 2015-01-27 15:53:37 -08:00
ZappoMan
23892ab1e7 fixed comments 2015-01-27 11:38:14 -08:00
ZappoMan
94e04e2d7d removed extra whitespace 2015-01-27 11:34:46 -08:00
ZappoMan
b1586d4f90 move debug into ifdef 2015-01-27 11:29:17 -08:00
ZappoMan
45dbff67f8 more hacking 2015-01-27 11:15:33 -08:00
ZappoMan
83d1cc911a hacking 2015-01-26 19:38:24 -08:00
ZappoMan
81185cfe56 removed some debugging 2015-01-26 12:46:22 -08:00
ZappoMan
08fbcbaf40 tweaks for debugging 2015-01-26 12:38:02 -08:00
ZappoMan
a1ec44b8e0 add developer menu item to disable sending physics updates 2015-01-26 12:05:57 -08:00
ZappoMan
73b9c06ec0 added some debugging 2015-01-26 11:13:30 -08:00
ZappoMan
f85774c687 adding some debugging 2015-01-26 09:45:33 -08:00
ZappoMan
9cc61e90f7 Merge branch 'master' of https://github.com/highfidelity/hifi into fixGlitches
Conflicts:
	libraries/entities/src/EntityItem.cpp
2015-01-23 15:01:35 -08:00
Andrew Meadows
1ad5f9c7db merge upstream/master into andrew/isentropic
Conflicts:
	libraries/physics/src/ObjectMotionState.cpp
2015-01-23 14:04:26 -08:00
ZappoMan
c01d2d657c added comment 2015-01-23 13:55:12 -08:00
Andrew Meadows
b34189115d Merge branch andrew/isentropic 2015-01-23 13:21:45 -08:00
Andrew Meadows
f2bcdfa2b4 update _lastSimulated for kinematic motion 2015-01-23 13:10:41 -08:00
Andrew Meadows
eefd32b42b remove KinematicController classes 2015-01-23 11:04:02 -08:00
Andrew Meadows
d173afaa70 add support for non-physical kinematic movement 2015-01-23 11:01:46 -08:00
Andrew Meadows
355759d3d4 Merge pull request #4152 from ZappoMan/fixGlitches
Fix glitches in bullets and multiple viewers
2015-01-22 13:49:00 -08:00
ZappoMan
d34764bd55 fix whitespace diff 2015-01-22 13:33:59 -08:00
ZappoMan
6a9a6968f2 debugging stutter 2015-01-22 13:32:57 -08:00
ZappoMan
c6ad1462e6 debugging stutter 2015-01-22 13:31:59 -08:00
ZappoMan
838a549abe debugging stutter 2015-01-22 13:31:09 -08:00
ZappoMan
14c7dc8eb9 debugging stutter 2015-01-22 13:13:18 -08:00
Andrew Meadows
3997b916c1 remove ground collision hack for physics testing 2015-01-22 09:17:51 -08:00
Andrew Meadows
77c4362991 fix typo 2015-01-21 18:14:24 -08:00
Andrew Meadows
b2e79a0157 don't process results when no simulation 2015-01-21 18:06:19 -08:00
Andrew Meadows
2751fab2c3 don't send collision events for inactive pairs
also throttle collision events to 30/sec
2015-01-21 18:02:13 -08:00
Andrew Meadows
1c38b08e8f remane emitEntityCollision... to entityCollision... 2015-01-21 14:07:23 -08:00
Andrew Meadows
6840daa0b5 removing tabs from formatting 2015-01-21 11:55:28 -08:00
Andrew Meadows
e49c76656f merge upstream/master into andrew/isentropic
Conflicts:
	libraries/physics/src/PhysicsEngine.cpp
2015-01-21 11:35:36 -08:00
Andrew Meadows
86583f3f3f physics collisions emit script collision events 2015-01-21 11:27:32 -08:00
Andrew Meadows
790d07d346 track known contacts and generate collision events 2015-01-20 14:18:10 -08:00
Andrew Meadows
5da38834e2 introduce notion of NumSteps vs NumSubsteps 2015-01-20 11:16:40 -08:00
Andrew Meadows
0154c613d0 change FrameCount to NumSubsteps for more accuracy 2015-01-20 11:02:48 -08:00
Andrew Meadows
549e3fac5f store backpointer to MotionState in btRigidBody 2015-01-20 10:45:58 -08:00
Andrew Meadows
e4f29412d5 cheaper failure adding entity to physics engine 2015-01-19 18:11:14 -08:00
Andrew Meadows
171fead347 remove log about failure to add to physics engine 2015-01-19 15:55:53 -08:00
Andrew Meadows
840acecbe6 merge upstream/master into andrew/bispinor
Conflicts:
	libraries/physics/src/EntityMotionState.cpp
2015-01-16 15:22:06 -08:00
Andrew Meadows
d5efc375d9 Merge pull request #4128 from ZappoMan/master
fix double targets and freezing bullets
2015-01-16 14:37:22 -08:00
Andrew Meadows
d5119b3532 merge upstream/master into andrew/bispinor
Conflicts:
	libraries/entities/src/EntityItem.cpp
	libraries/physics/src/EntityMotionState.h
	libraries/physics/src/ObjectMotionState.cpp
	libraries/physics/src/PhysicsEngine.cpp
	libraries/physics/src/PhysicsEngine.h
2015-01-16 14:36:27 -08:00
ZappoMan
9a60896a40 fix double targets and freezing bullets 2015-01-16 14:24:50 -08:00
Andrew Meadows
7c9419aa4e fix non-bullet build 2015-01-16 10:34:52 -08:00
Andrew Meadows
2427fa68cd remove unnecessary Bullet #include 2015-01-16 10:06:39 -08:00
Andrew Meadows
3fed38793e merge andrew/origin/inertia to andrew/local/inertia 2015-01-15 17:55:51 -08:00
Andrew Meadows
4c1cd991f4 remove pessimistic send of object updates
we have not yet seen the headache of packetloss and unreliable messages
2015-01-15 17:53:37 -08:00
Andrew Meadows
250fd98fee support for simple kinematic motion 2015-01-15 17:51:01 -08:00
Andrew Meadows
51cc9d6d9a alt method for repressing unused var warnings 2015-01-15 10:46:09 -08:00
Andrew Meadows
9eb4d66327 remove warnings 2015-01-15 10:36:17 -08:00
Andrew Meadows
ff171a5782 Bullet is now required dependency 2015-01-15 10:27:43 -08:00
Andrew Meadows
03b8badd81 EntityItem stores density rather than mass. 2015-01-14 15:00:57 -08:00
Andrew Meadows
dcca5d532a fix for glitchy physics updates
The main problem was: ObjectMotionState::_sentPosition and friends
were not being updated when the EntityServer update arrives.
2015-01-13 14:00:37 -08:00
Andrew Meadows
4946ec18b6 remove some TODO comments 2015-01-09 09:28:01 -08:00
Andrew Meadows
1d371a9627 merge upstream/master into andrew/inertia 2015-01-08 10:24:05 -08:00
Andrew Meadows
c37c1515ba EntitySimulation is lockable
also DeleteEntityOperator just removes the entities
and EntityTree does the actual delete
(after properly locking its _simulation)
2015-01-08 10:22:25 -08:00
Andrew Meadows
d2bd95703a use degrees/sec for EntityItem angular velocity 2015-01-07 14:04:22 -08:00
Andrew Meadows
0a8437a578 increasing default restitution to 0.5 2015-01-05 17:31:23 -08:00
Andrew Meadows
e2884c56f5 only predict remote transform for moving objects 2015-01-05 15:16:03 -08:00
Andrew Meadows
75a8faec86 purge support for voxels from PhysicsEngine 2015-01-05 15:02:18 -08:00
Andrew Meadows
244a8503ef include damping in remote extrapolation model 2015-01-05 14:48:16 -08:00
Andrew Meadows
3b7770f405 change meaning of damping to agree with bullet
0 = no damping
1 = 100% damping

The new formula is: velocity *= (1 - damping)^dt
2015-01-05 11:23:01 -08:00
Andrew Meadows
30200ef7eb add damping to ObjectMotionState 2015-01-05 09:17:46 -08:00
Andrew Meadows
6f72d4ad81 easier to read Bullet to GLM conversions and back 2014-12-30 13:15:57 -08:00
Andrew Meadows
5e2246625b fix layout to abide by the coding standard 2014-12-30 12:09:22 -08:00
Andrew Meadows
e43d7b7369 fix indentation in ctor init 2014-12-30 12:05:28 -08:00
Andrew Meadows
ce14c823a1 add comment about stubbed ObjectMotionState
for when Bullet lib is not found
2014-12-29 16:41:27 -08:00
Andrew Meadows
a97b8b0ea9 fix memory leak of EntityMotionState's 2014-12-29 16:33:41 -08:00
Andrew Meadows
8cb8092310 remove unused code
I forget what I was using UUIDHashKey for
2014-12-29 10:55:47 -08:00
Andrew Meadows
b078850c6a remove personal TODO list from code file 2014-12-29 10:46:56 -08:00
Andrew Meadows
9b7e50858a merge upstream/master into andrew/inertia
Conflicts:
	libraries/avatars/CMakeLists.txt
	libraries/entities/CMakeLists.txt
2014-12-29 09:15:49 -08:00
Andrew Meadows
25b00977be fix cmake config for bullet after c++-11 changes 2014-12-18 17:34:39 -08:00
Stephen Birarda
114e3bb2ff rename cmake macro to represent actual purpose 2014-12-18 16:51:20 -08:00
Andrew Meadows
c6afa0f7e1 remove test hack for higher than normal ground 2014-12-17 14:17:30 -08:00
Andrew Meadows
6ea766b48d merge andrew/thermonuclear into andrew/inertia
Conflicts:
	interface/src/Application.cpp
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityTypes.cpp
2014-12-17 13:21:00 -08:00
Andrew Meadows
905d7f50eb comments on TODO list 2014-12-17 12:39:48 -08:00
Andrew Meadows
8de309a7a9 more correct _created and _lastEdited 2014-12-17 12:38:26 -08:00
Andrew Meadows
31486a81c1 updated TODO notes 2014-12-15 14:41:04 -08:00
Andrew Meadows
b3731e9530 hack for "reliable" packet send when objects stop moving 2014-12-15 14:36:27 -08:00
Andrew Meadows
fd8e3f6169 add moved entities to lists for sorting
and also for outgoing packet updates
2014-12-12 13:28:12 -08:00
Andrew Meadows
ad7641c7e0 repairs to build when Bullet not found 2014-12-11 16:05:45 -08:00
Andrew Meadows
c3f8f8ab98 init PhysicsEngine with an EntityEditPacketSender 2014-12-11 13:29:29 -08:00
Andrew Meadows
4977bfb708 ObjectMotionState puts self on outgoing queue 2014-12-11 12:40:43 -08:00
Andrew Meadows
572ceb75a4 clarification of what outgoing flags are about 2014-12-11 12:07:53 -08:00
Andrew Meadows
cc0e82b97f incoming changes is now QSet<ObjectMotionState*> 2014-12-11 10:56:22 -08:00
Andrew Meadows
11f1ad1d7f move worldOffset into ObjectMotionState
add more methods for getting/clearing incoming/outgoing flags
2014-12-11 10:52:34 -08:00
Andrew Meadows
d9f183458a _entityMotionStates is Qset of EntityMotionState* 2014-12-11 08:43:01 -08:00
Andrew Meadows
f9ba4d355c implement EntitySimulation API in PhysicsEngine 2014-12-10 17:01:20 -08:00
Andrew Meadows
ab75150175 moved position/velocity send history to base class 2014-12-10 17:00:23 -08:00
Andrew Meadows
b0cc3a8509 add logic for when to update moving entity 2014-12-08 17:18:07 -08:00
Andrew Meadows
d6c97be78e using an infinite plane for the ground 2014-12-03 20:17:42 -08:00
Andrew Meadows
85e7c6166b support for spherical entities 2014-12-03 12:10:26 -08:00
Andrew Meadows
3c67400e13 namechange CustomMotionState to ObjectMotionState 2014-12-03 11:12:04 -08:00
Andrew Meadows
8d49b694cc ShapeManager doesn't support tiny and giant shapes 2014-12-03 10:08:26 -08:00
Andrew Meadows
64cdef42fe simplified API of PositionHashKey 2014-12-03 07:23:14 -08:00
Andrew Meadows
29d0d10103 track entities added to PhysicsEngine
also fix for RigidBody's not going dynamic
and a fix for changed entities staying on changed list
2014-12-02 17:47:48 -08:00
Andrew Meadows
9f11121df2 oops, forgot to add entities to Bullet simulation 2014-12-02 15:44:07 -08:00
Andrew Meadows
c9ea6885c1 PhysicsEngine is now an EntitySimulation 2014-12-02 15:29:41 -08:00
Andrew Meadows
919214b7cb split ShapeInfo into shared and physics parts 2014-12-02 10:44:40 -08:00
Andrew Meadows
e6a9081184 Moving ShapeInfo to shared lib 2014-12-01 16:47:55 -08:00
Andrew Meadows
8aba2a06e0 Splitting Bullet stuff out of ShapeInfo 2014-12-01 16:47:33 -08:00
Andrew Meadows
1df6c32a4e moving Shape* back into shared lib
removing dependency of entities lib on physics lib
physics lib now depends on entities lib
2014-12-01 16:03:14 -08:00
Andrew Meadows
1c569dcf33 remove some cruft 2014-11-24 15:05:09 -08:00
Andrew Meadows
0e0eaea849 fix typo that broke the build 2014-11-24 11:36:17 -08:00
Andrew Meadows
37093cbd00 merge upstream/master into andrew/inertia
Conflicts:
	interface/src/Application.cpp
2014-11-24 11:24:39 -08:00
Andrew Meadows
ec1f11c1a8 route more entity updates into physics engine 2014-11-24 11:21:40 -08:00
Atlante45
ae3bcc8f06 No more .f 2014-11-19 16:53:39 -08:00
Andrew Meadows
48164c9399 cleanup and moving things around 2014-11-19 15:31:17 -08:00
Andrew Meadows
388830c2a2 Merge branch 'bispinor' into inertia
Conflicts:
	interface/src/entities/RenderableModelEntityItem.cpp
	libraries/entities/src/BoxEntityItem.cpp
	libraries/entities/src/EntityItem.cpp
	libraries/entities/src/EntityItem.h
	libraries/entities/src/EntityTree.cpp
	libraries/entities/src/EntityTree.h
	libraries/entities/src/EntityTreeElement.cpp
2014-11-18 10:23:38 -08:00
Andrew Meadows
2d400e6ae0 rename PhysicsWorld to PhysicsEngine 2014-11-18 09:55:25 -08:00
Andrew Meadows
2f9a35412f initial support for STATIC and KINEMATIC motion 2014-11-14 15:56:52 -08:00
Andrew Meadows
7fb7256a92 MotionState also ferries velocity 2014-11-14 09:02:22 -08:00
Andrew Meadows
14f49df44d Application gets a ThreadSafePhysicsWorld 2014-11-13 10:02:36 -08:00
Andrew Meadows
0117233ed4 add ThreadSafeDynamicsWorld pure virtual interface 2014-11-12 15:19:33 -08:00
Andrew Meadows
9e5007a0a3 added a comment 2014-11-11 17:31:27 -08:00
Andrew Meadows
ccc3156587 PhysicsWorld::addEntity() doesn't need mass arg 2014-11-11 17:28:42 -08:00
Andrew Meadows
7c53c7a495 fix build to work when cmake does not fiind Bullet 2014-11-11 12:24:29 -08:00
Andrew Meadows
0d0f98f669 init and step physics simulation 2014-11-11 12:09:59 -08:00
Andrew Meadows
82d7b70ec9 add offset to physics simulation 2014-11-11 10:56:31 -08:00
Andrew Meadows
ed90bf00b9 add offset to physics simulation
we anticipate floating point error problems at distances far from origin
and we don't want the simulation to span a big space anyway
so world-frame objects are simulated in a local frame
and positions are translated back and forth as necessary
2014-11-07 08:51:57 -08:00
Andrew Meadows
053b16783c initial impl of PhysicsWorld::addEntity() 2014-11-06 16:42:07 -08:00
Andrew Meadows
94b6d89b4e namechange EntityMotionState to CustomMotionState 2014-11-06 10:59:04 -08:00
Andrew Meadows
01b76af9d0 moved EntityMotionState.* to CustomMotionState.* 2014-11-06 10:58:04 -08:00
Andrew Meadows
1097e7f1f2 stubbery for EntityMotionState 2014-11-05 16:35:06 -08:00
Andrew Meadows
8e90cca290 PhysicsWorld can add and remove voxels 2014-11-05 13:05:43 -08:00
Andrew Meadows
2734afcf9a Adding BulletUtil.h with tests. 2014-11-04 16:43:50 -08:00
Andrew Meadows
57e972d876 ShapeKey now derives from DoubleHashKey 2014-11-04 14:54:35 -08:00
Andrew Meadows
f1bdd2ef7b PhysicsWorld has a ShapeManager 2014-11-03 16:02:16 -08:00
Andrew Meadows
4a1133fbc2 moved ShapeInfo tests to their own file 2014-11-03 15:25:04 -08:00
Andrew Meadows
b1b6188bb8 ShapeManager has improved HashMap 2014-11-03 14:01:19 -08:00
Andrew Meadows
d26540b029 ShapeManager now under unit test 2014-10-31 17:13:17 -07:00
Andrew Meadows
50a97849bb Add PhysicsWorld and ShapeManager classes 2014-10-30 10:42:44 -07:00
Andrew Meadows
29fd359385 fix typo in libraries/physics/CMakeLists.txt 2014-10-29 14:39:23 -07:00
Andrew Meadows
c18121756c fixed path to file in comments 2014-10-29 14:33:11 -07:00
Andrew Meadows
c9450bba02 Adding Bullet as non-required dependency 2014-10-28 17:32:34 -07:00
Andrew Meadows
4c3cdf5b7a move stuff out of shared and into physics library 2014-10-28 13:51:45 -07:00