Andrew Meadows
40f6ecd936
fix crash for dereference null pointer
2015-06-26 21:58:40 -07:00
Andrew Meadows
44d3074561
remove debug code
2015-06-26 21:58:03 -07:00
Andrew Meadows
12fc18092b
SimulationOwner as one property
2015-06-26 21:58:03 -07:00
Andrew Meadows
cf74dbe1dc
partial progress toward sim ownership negotiations
...
works well for just a few objects but fails for piles
committing some debug stuff that will have to be torn out later
2015-06-26 21:57:04 -07:00
Andrew Meadows
a33c350385
improved forcing of simulator ownership bid
2015-06-26 21:57:04 -07:00
Andrew Meadows
8510110324
increase sim priority when flagged for ownership
2015-06-26 21:57:04 -07:00
Andrew Meadows
2579247c34
claim ownership faster for scripted manipulations
2015-06-26 21:57:04 -07:00
Andrew Meadows
7c793c6397
accept simulation release from entity-server
2015-06-26 21:57:04 -07:00
Andrew Meadows
d0ac3e4514
more work on simulator priority
...
scripts that edit terse update data try to assert priority
physics simulation tries to assert "volunteer" priority
max priority rules are applied in entity server
2015-06-26 21:57:04 -07:00
Seth Alves
f5f1d0829c
Merge branch 'physics-lock-entity-tree' of github.com:sethalves/hifi into actions-over-wire
2015-06-26 07:20:51 -07:00
Seth Alves
015498a6e0
move function up so this builds in non-debug mode
2015-06-26 07:20:22 -07:00
Seth Alves
2682c4720d
fix alt-branch of ifdef
2015-06-26 07:04:10 -07:00
Seth Alves
a0d77c061c
lock the entity tree during physics operations that access then entity tree. if the simulation and entity-tree are both going to be locked, be sure to lock the entity tree first (and unlock it last), because this is what the network-reading thread does
2015-06-26 07:00:28 -07:00
Seth Alves
4849e2922e
quiet valgrind
2015-06-22 14:21:25 -07:00
Philip Rosedale
61a2196a30
Reduce error tolerances for ballistic prediction that trigger updating the server
2015-06-18 13:21:37 -07:00
Andrew Meadows
8d41960cc3
reset simulation bid counters on object activation
2015-06-10 12:40:14 -07:00
Seth Alves
c5143cdfa0
Merge pull request #5027 from AndrewMeadows/isentropic
...
cleanup around sending all "terse update" data whenever some of it changes
2015-06-05 10:41:06 -07:00
Seth Alves
edb3622c85
Merge pull request #5037 from AndrewMeadows/inertia
...
collision groups for physical objects
2015-06-05 10:26:28 -07:00
Andrew Meadows
8e61a10bcf
compute collision group for entity
2015-06-03 14:22:48 -07:00
Andrew Meadows
ec0b4a956a
move collision group consts to shared lib
2015-06-03 14:13:51 -07:00
Andrew Meadows
7b6cc59d30
basic support for collision groups
2015-06-03 11:40:48 -07:00
Howard Stearns
c036b5fd4b
Actually commit the changes this time!
2015-06-03 10:19:28 -07:00
Andrew Meadows
2400f5c000
update ALL parameters of remote physics simulation
2015-06-01 09:02:59 -07:00
Andrew Meadows
aba539928d
fix grab glitches and failure to own simulation
2015-05-27 18:05:59 -07:00
Andrew Meadows
16e5710325
Merge pull request #4954 from ZappoMan/entitysmartpointers
...
EnitityItem smart pointers
2015-05-26 14:05:03 -07:00
ZappoMan
8b78fc4190
EnitityItem smart pointers
2015-05-22 17:57:50 -07:00
Andrew Meadows
461d08c0a9
merge upstream/master into andrew/bispinor
2015-05-22 11:35:02 -07:00
Andrew Meadows
0431e8da36
put avatar body in right spot, and give it mass
2015-05-22 11:08:56 -07:00
Andrew Meadows
2e3973dfdd
impl AvatarMotionState::set/getWorldTransform()
2015-05-21 15:34:30 -07:00
Andrew Meadows
67f5d0773d
some list management of AvatarMotionStates
2015-05-21 14:40:47 -07:00
Seth Alves
4a59dc24c5
split entity-add and entity-edit messages
2015-05-20 14:52:03 -07:00
Seth Alves
a769cfdaf2
client decides on new entity-ids, keep EntityItemID class
2015-05-20 10:42:19 -07:00
Seth Alves
f9d46b0cb5
interface decides on entityIDs rather than bouncing a temporary id through the entity server
2015-05-19 14:25:23 -07:00
Andrew Meadows
c631f85bf9
cleanup of simulation ownership/update logic
2015-05-14 08:43:54 -07:00
Andrew Meadows
fb34a5ba84
renaming and cleanup
2015-05-13 08:44:10 -07:00
Andrew Meadows
4872a565c9
bid for simulation ownership
2015-05-12 21:46:52 -07:00
Andrew Meadows
e89471e7d6
enable non-moving update when obj is active
2015-05-08 15:41:00 -07:00
Andrew Meadows
ada48bcb70
fix for glitchy physics updates
2015-05-08 09:06:31 -07:00
Andrew Meadows
1879a67804
cleanup
2015-05-07 14:42:09 -07:00
Seth Alves
0347af9682
minor cleanup
2015-05-07 14:03:50 -07:00
Andrew Meadows
47f978b86e
merge
2015-05-07 10:31:27 -07:00
Andrew Meadows
070140440d
fix crash bug when invalid entity ptr accessed
2015-05-07 10:30:22 -07:00
Seth Alves
867fe18472
put some code back now that entity-server is doing simple simulation again. don't draw blue physics-enabled dot unless debug menu-item is checked
2015-05-07 10:11:36 -07:00
Seth Alves
fe14202f51
add getName passthrough to ObjecdtMotionState, don't compute model shapes until the model has been simulated
2015-05-07 09:53:39 -07:00
Seth Alves
5ac8558168
flash yellow box when transmitting an edit packet
2015-05-06 17:03:27 -07:00
Seth Alves
cc5f2ee451
in isMovingVsServer look at entity velocity only
2015-05-06 16:26:27 -07:00
Seth Alves
ba6f6d19cc
disable updateServerPhysicsVariables
2015-05-06 16:20:16 -07:00
Seth Alves
630f1ce9d9
isMovingVsServer function
2015-05-06 16:13:07 -07:00
Seth Alves
b0ccabe38e
update a motionstate's idea of what the entity-server thinks when an incoming update packet arrives
2015-05-06 16:05:05 -07:00
Seth Alves
4c3cbea261
don't auto-remove simulation owner unless the Node is gone. put back code that causes interfaces to give up ownership
2015-05-06 15:32:02 -07:00
Seth Alves
86ec12b22c
don't increase moving-without-simulator counter unless the thing is moving enough
2015-05-06 14:30:45 -07:00
Seth Alves
fe308c0189
only do infection during collisions if one of the objects is being simulated by this interface
2015-05-06 13:50:14 -07:00
Seth Alves
96a44314c9
don't have interface give up ownership
2015-05-06 13:29:54 -07:00
Andrew Meadows
14f925b48e
merge seth/dice-on-table-1 into andrew/nova
...
Conflicts:
libraries/physics/src/EntityMotionState.cpp
libraries/physics/src/ObjectMotionState.h
2015-05-05 16:54:53 -07:00
Andrew Meadows
d4701b4310
namechange getIncomingDF --> getAndClearIncomingDF
2015-05-05 16:49:41 -07:00
Seth Alves
c35edd8eb4
some debugging on Andrew's refactor
2015-05-05 16:40:10 -07:00
Seth Alves
1cd93b9ec8
pull andrew's branch, add back in visual indicator of an entity being active in bullet
2015-05-05 13:14:22 -07:00
Andrew Meadows
cfad016ba3
woops, forgot to these changes in last commit
2015-05-05 10:14:19 -07:00
Andrew Meadows
066e36c3e7
fix crash bugs (don't reference NULL pointers)
2015-05-04 16:52:36 -07:00
Andrew Meadows
42ec39c578
add ObjectMotionType::bump(), use in PhysicsEngine
2015-05-01 14:39:33 -07:00
Andrew Meadows
b023fe582a
make things compile
2015-05-01 10:44:50 -07:00
Andrew Meadows
c3901939e6
make some things compile after reorganization
2015-04-30 13:02:18 -07:00
Andrew Meadows
31ab16ac62
move stuff into ObjectMotionState
2015-04-29 16:16:44 -07:00
Andrew Meadows
ab38572620
new PhysicsEngine API is mostly in place
...
doesn't compile, of course
large code movements are done
non-physical kinematics have been lost --
will readd in PhysicalEntitySimuation class
2015-04-29 09:48:02 -07:00
Andrew Meadows
14b6ee608a
more PhysicalEntitySimulation implementation
...
with changes to API's accordingly (does not compile yet)
2015-04-28 15:07:37 -07:00
Andrew Meadows
31e5758422
namechange updateObjectEasy()-->updateBodyEasy()
2015-04-27 13:04:59 -07:00
Andrew Meadows
72deb2e49b
merge upstream/master into andrew/thermonuclear
...
Conflicts:
libraries/entities/src/EntityItem.h
libraries/physics/src/EntityMotionState.cpp
2015-04-27 12:54:21 -07:00
Seth Alves
2e5049a190
fix bug caused by no-longer reusing a variable
2015-04-27 12:20:01 -07:00
Seth Alves
8278f52a79
cleanups
2015-04-27 10:59:51 -07:00
Andrew Meadows
e3d29d74af
name changes and preparation for more cleanup
2015-04-26 15:24:30 -07:00
Seth Alves
81ff8a4448
count steps during which an EntityItem is moving but has no simulation owner. Once the count is high enough (how high is TBD), attempt to claim ownership
2015-04-25 07:17:21 -07:00
Seth Alves
48ec0c8339
formatting, re-enable code that causes an interface to attempt to claim a moving object with no current simulation-owner
2015-04-25 06:56:19 -07:00
Seth Alves
218393a2b3
rather than keeping track of previous pos/rot sent by server, use a new flag that indicates that the values should be updated in the physics engine, but that the object should not be woken
2015-04-24 17:37:19 -07:00
Seth Alves
6e6793cbcc
remove debugging prints
2015-04-24 15:18:02 -07:00
Andrew Meadows
3ecf959b3e
removed cached copies of damping and restitution
2015-04-24 14:50:37 -07:00
Seth Alves
fea8d84618
sync
2015-04-24 14:09:10 -07:00
Seth Alves
ad85837b5a
sync
2015-04-24 13:44:34 -07:00
Andrew Meadows
f09a67af6c
don't need temp variable
2015-04-24 13:26:26 -07:00
Seth Alves
902e84c711
sync
2015-04-24 13:10:38 -07:00
Seth Alves
a27f8f3f10
sync
2015-04-24 11:28:44 -07:00
Seth Alves
926694517f
sync
2015-04-24 11:07:45 -07:00
Seth Alves
1b84be6e10
attempting to have visual indicator of simulatorID
2015-04-24 10:55:43 -07:00
Seth Alves
6fdbce9ee3
oops
2015-04-24 09:29:57 -07:00
Seth Alves
6d151ee3ed
try a different way of identifying when to claim simulation ownership of a moving entity
2015-04-24 09:29:05 -07:00
Seth Alves
cf0499e671
various physics-related experiments
2015-04-23 21:07:04 -07:00
Seth Alves
9e96026c52
move _accelerationNearlyGravityCount and _shouldClaimSimulationOwnership from EntityItem to EntityMotionState
2015-04-22 21:36:36 -07:00
Seth Alves
96b4517e6e
when removing something from bullet, attempt to wake up anything that was touching it
2015-04-22 16:05:31 -07:00
Seth Alves
7781808bea
remove debug prints, fix a comment
2015-04-22 15:25:09 -07:00
Seth Alves
6678922f5c
put back code for interface giving up simulator status when something stops
2015-04-22 15:09:56 -07:00
Seth Alves
3450597d70
remove some debugging prints
2015-04-22 15:03:23 -07:00
Seth Alves
36dbbd0c9d
experimenting
2015-04-22 14:14:12 -07:00
Seth Alves
69ee33a392
experimenting
2015-04-22 13:29:28 -07:00
Seth Alves
7382b0b19f
experimenting
2015-04-22 13:17:20 -07:00
Seth Alves
a6750eafd8
experimenting
2015-04-22 13:03:59 -07:00
Seth Alves
dc30ca0210
experimenting
2015-04-22 12:51:29 -07:00
Seth Alves
41166c1a42
allow entity server to time-out entity-simulation ownership rather than having interfaces give it up
2015-04-22 11:18:18 -07:00
Seth Alves
3f705f3172
keep track of the number of simulation steps each entity has been accelerated at nearly its gravity. if we get 4 in a row, start sending acceleration equal to gravity to the entity server, so it will include gravity in its estimates
2015-04-22 10:39:13 -07:00
Seth Alves
cde64893af
coding standard
2015-04-21 18:36:06 -07:00
Seth Alves
4a5631fca6
cleanups, diff minimization
2015-04-20 16:51: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
fbff3627dc
attempt to claim simulation ownership of entities the avatar crashes with
2015-04-20 11:13:51 -07:00
Seth Alves
dac57c44da
if measured acceleration is close to zero, send zero to entity server, else send gravity
2015-04-17 15:05:47 -07:00
Seth Alves
292ba20cf3
pull andrew's measure-acceleration branch
2015-04-17 11:35:12 -07:00
Seth Alves
62a45ccebb
re-enable code that gives up simulation ownership
2015-04-16 17:00:36 -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
5180e7e715
measure linear velocity of moving objects
2015-04-16 13:44:17 -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
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
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
Seth Alves
396f6b1987
mess with debugging prints
2015-04-13 15:22:54 -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
55bab2efd6
put physics into its own logging group
2015-04-06 18:09:45 -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
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
Andrew Meadows
5776df1012
load dynamic obj as inactive when not moving
2015-02-25 12:07:19 -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
ZappoMan
23892ab1e7
fixed comments
2015-01-27 11:38:14 -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
ZappoMan
c01d2d657c
added comment
2015-01-23 13:55:12 -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
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
86583f3f3f
physics collisions emit script collision events
2015-01-21 11:27:32 -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
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
d2bd95703a
use degrees/sec for EntityItem angular velocity
2015-01-07 14:04:22 -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
a97b8b0ea9
fix memory leak of EntityMotionState's
2014-12-29 16:33:41 -08:00
Andrew Meadows
8de309a7a9
more correct _created and _lastEdited
2014-12-17 12:38:26 -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
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
11f1ad1d7f
move worldOffset into ObjectMotionState
...
add more methods for getting/clearing incoming/outgoing flags
2014-12-11 10:52:34 -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
85e7c6166b
support for spherical entities
2014-12-03 12:10:26 -08:00
Andrew Meadows
919214b7cb
split ShapeInfo into shared and physics parts
2014-12-02 10:44:40 -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
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