Commit graph

260 commits

Author SHA1 Message Date
Seth Alves
23f1767634 cleanup 2015-04-20 16:13:28 -07:00
Seth Alves
d6c8bd94cf clean up some debugging prints 2015-04-20 15:59:33 -07:00
Seth Alves
08d300afcd use a flag to indicate that simulation ownership should be grabbed 2015-04-20 11:49:10 -07:00
Seth Alves
88f289f3c1 small cleanup and some debugging prints 2015-04-20 11:19:48 -07:00
Seth Alves
fbff3627dc attempt to claim simulation ownership of entities the avatar crashes with 2015-04-20 11:13:51 -07:00
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
Eric Levin
096f69961a Filtering triggering of collisions with contact type of "continue" 2015-04-16 16:42:28 -07:00
Andrew Meadows
619d1ba191 rename to measureAcceleration 2015-04-16 14:09:33 -07:00
Andrew Meadows
5180e7e715 measure linear velocity of moving objects 2015-04-16 13:44:17 -07:00
Andrew Meadows
abb40ca080 cleanup: split stats dump out of stepSimulation 2015-04-14 09:00:36 -07:00
Andrew Meadows
40c94fa00e merge upstream/master into andrew/isentropic 2015-04-07 16:23:38 -07:00
Seth Alves
55bab2efd6 put physics into its own logging group 2015-04-06 18:09:45 -07:00
Andrew Meadows
435ce106eb Add DynamicCharacterController prototype 2015-04-06 16:03:13 -07:00
Andrew Meadows
27d6d9f720 add Bullet profiling hooks for physics simulation 2015-04-02 15:20:16 -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
Seth Alves
7137b41375 free these so it's easier to see other leaks in valgrind 2015-03-30 09:30:37 -07:00
Andrew Meadows
430158c109 updateShapeIfNecessary() is a more correct name 2015-03-24 23:35:09 -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
Andrew Meadows
6454149536 formatting and comments 2015-03-20 12:45:29 -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
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
dd97b54e52 quiet physics log spam 2015-03-18 13:22:29 -07:00
Seth Alves
2dd75fef2c remove some unneeded Q_OBJECT macros, diff minimization 2015-03-17 19:12:26 -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
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
87cc710efc more merge madness, calculate 2nd PhysicsEngine hash with qChecksum if url is set 2015-03-13 18:43:24 -07:00
Seth Alves
50798398ff merge from upstream 2015-03-13 18:04:55 -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
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
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
Andrew Meadows
3d531e8304 add f at end of float literal 2015-03-10 14:24:49 -07:00
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
b2cfed8bca removed unused blob of code 2015-03-08 09:04:00 -07:00
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
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
Andrew Meadows
5776df1012 load dynamic obj as inactive when not moving 2015-02-25 12:07:19 -08:00
Andrew Meadows
b4da2ddd52 fix physics crash on disconnect from domainserver 2015-02-05 09:13:32 -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
d5c0c200de optimization for when physics engine doesn't step 2015-01-27 15:54:32 -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
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
d173afaa70 add support for non-physical kinematic movement 2015-01-23 11:01:46 -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
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
Andrew Meadows
7c9419aa4e fix non-bullet build 2015-01-16 10:34:52 -08:00
Andrew Meadows
3fed38793e merge andrew/origin/inertia to andrew/local/inertia 2015-01-15 17:55:51 -08:00
Andrew Meadows
250fd98fee support for simple kinematic motion 2015-01-15 17:51:01 -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
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
75a8faec86 purge support for voxels from PhysicsEngine 2015-01-05 15:02:18 -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
a97b8b0ea9 fix memory leak of EntityMotionState's 2014-12-29 16:33:41 -08:00
Andrew Meadows
b078850c6a remove personal TODO list from code file 2014-12-29 10:46:56 -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
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
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
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
3c67400e13 namechange CustomMotionState to ObjectMotionState 2014-12-03 11:12:04 -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
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
ec1f11c1a8 route more entity updates into physics engine 2014-11-24 11:21:40 -08:00
Andrew Meadows
48164c9399 cleanup and moving things around 2014-11-19 15:31:17 -08:00
Andrew Meadows
2d400e6ae0 rename PhysicsWorld to PhysicsEngine 2014-11-18 09:55:25 -08:00
Renamed from libraries/physics/src/PhysicsWorld.cpp (Browse further)