Commit graph

1571 commits

Author SHA1 Message Date
Cain Kilgore
72ca62c4af Initial Commit - more to do. 2017-09-14 00:25:11 +01:00
Dante Ruiz
fec8482b69 Merge branch 'master' of github.com:highfidelity/hifi into feature/ant-man 2017-09-05 16:26:51 -07:00
Seth Alves
41b51804dc fix comment 2017-08-30 17:53:55 -07:00
Seth Alves
3f0a95d8db remove unneeded line 2017-08-30 17:53:20 -07:00
Seth Alves
ca86ce59c2 fix a bug that cuased dynamic children to wink in and out and then vanish 2017-08-30 17:44:42 -07:00
Anthony J. Thibault
573985c7c9 Merge branch 'master' into feature/ant-man 2017-08-28 09:27:04 -07:00
Anthony J. Thibault
4f830cf1dc Calculate jump speed based on canonical jump height. 2017-08-25 15:34:51 -07:00
Brad Davis
e817d3ced4 Threaded rendering & entity rendering refactor 2017-08-24 13:34:34 -07:00
Anthony J. Thibault
cd6d2173cc Bug fix for follow rotation of CharacterController 2017-08-21 18:09:58 -07:00
Anthony J. Thibault
8e56404c40 Fixes for flying and rotation re-centering in wikiplanet 2017-08-21 17:42:25 -07:00
Anthony J. Thibault
da20eac995 Bug fix for deadlock between EntitySimulation and EntityItem locks.
This is a classic deadlock between the main thread and the OctreeProcessor network thread.
On the main thread, the EntitySimulation lock is taken before the EntityItem read lock is taken.
On the network thread, the EntityItem write lock is taken before the EntitySimulation lock is taken.

To work around this issue the network thread no longer takes the EntitySimulation lock when calling
PhysicalEntitySimulation::addDynamic().  Instead, a fine grained lock around the EntitySimulation's dynamic lists
is used instead.
2017-08-21 17:14:49 -07:00
Andrew Meadows
e465186511 Merge pull request #11048 from 1P-Cusack/21389
WL21389 PR1:  Representation of collision shapes need updating (details below).
2017-08-03 09:04:31 -07:00
Anthony Thibault
8a87ebd2a8 Merge pull request #11036 from AndrewMeadows/walkabout
fix bugs preventing avatar from walking on spherical planet
2017-08-01 16:36:35 -07:00
LaShonda Hopper
ef1e426273 [WL21389] Some code and todo cleanup in prep for PR1.
Changes to be committed:
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/shared/src/ShapeInfo.cpp
2017-07-25 15:27:02 -04:00
Leander Hasty
d155c02640 [WL21389] wip and modifications based on comments
https://github.com/highfidelity/hifi/pull/11024#pullrequestreview-51611518

Cleans up tabs, moves new functionality out of ShapeFactory directly to
RenderableShapeEntityItem's computeShapeInfo override, begins to break down
where we will need pointlists.

Still need to determine how rotation is handled for pointlists, and check
for axis alignment on cylinders before deciding on a shape.

Changes to be committed:
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.h
	modified:   libraries/entities/CMakeLists.txt
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/physics/src/ShapeFactory.h
	modified:   libraries/shared/src/ShapeInfo.cpp
	modified:   scripts/developer/tests/basicEntityTest/entitySpawner.js
2017-07-25 15:20:35 -04:00
LaShonda Hopper
75403124b6 [WL21389] Addresses physics library dependency and has some other fixes (details below).
* Addresses physics library dependency by moving computeShapeInfo override from
ShapeEntityItem (which is within Entities Library) to RenderableShapeEntityItem
(which is in Entities-Renderer Library).
** Entities-Renderer library already links against the physic library.
** Per discussion with Andrew Meadows: In order to ShapeEntityItem to be
utilized the library dependency between the Entity and Physics library
would need to be resolved to avoid the cyclical reliance which isn't in
the scope of this ticket.
* Updates shapeSpawner test script from the default clone of basicEntityTest\entitySpawner.js
** Objects now have a finite lifetime
** Script now cleans up the objects created when the script ends
** Also moved some adjustable properties out into var aliases at the top of the
file for easier/less error prone tweaking. Should probably add one for the shapeType.
* Fixes some issues with validateShapeType helper function
* Removed naive attempt at including physics library within entities library.
* Transferred some todos from notes
* Fixed some formatting

NOTE(s):
  This compiles and runs.  Cylinder is spawned and treated as CYLINDER_Y.

TODO(s):
* Add tweakable var for shapeType within shapeSpawner.js
* Vet and verify other shapes.
* Add in edge case handling.
* Add in support for other shapes to ShapeInfo infrastructure.

Changes to be committed:
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.h
	modified:   libraries/entities/CMakeLists.txt
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/shared/src/ShapeInfo.cpp
	modified:   scripts/developer/tests/basicEntityTest/shapeSpawner.js
2017-07-25 14:43:39 -04:00
LaShonda Hopper
5bc38bd7f0 [WL21389] Collision Shapes need to be updated (details below).
Revised approach involves creating a helper function within ShapeFactory to aid
in devising the ShapeType to be used by an ShapeEntityItem for collision.  The
ShapeFactory is currently doing this for creating the actual Bullet Library
collision shapes.

ShapeEntityItem overrides its virtually inherited computeShapeInfo which
in turn calls the new ShapeFactory helper function.

ShapeEntityItem has a new memvar _collisionShapeType to cache its actual
ShapeType used by the physics system.  This memvar is returned via the getShapeType
accessor which is expected to return an object's ShapeType.

Note(s):
    This is similar to the original approach save translation between entity::Shape and ShapeType
    isn't tied to the EntityItemProperties shapeTypeNames or shapeType. This approach more
    directly solves the issue of getting the actual ShapeType used by the time it's needed
    to determine the bullet collision object type created when initializing the physic information.

    Translation of the ShapeEntityItem's entity::Shape to its ShapeType is handled by
    ShapeFactory which handles creating the bullet collision objects when setting up
    physics on the ShapeEntityItems.

Known Issue(s):
    This doesn't compile.  It appears that the Entity Library needs to know about
    the Physics Library.  The naive attempt at providing that link failed to resolve
    all compilation issues.

    Current Error:
    C1083: Cannot open include file: btBulletDynamicsCommon.h:
    No such file or directory (C:\projects\cusack\libraries\entities\src\ShapeEntityItem.cpp)
       C:\projects\cusack\libraries\physics\src\ShapeFactory.h	15	1	entities

	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities/CMakeLists.txt
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/physics/src/ShapeFactory.h
	modified:   libraries/physics/src/ShapeInfo.cpp
	modified:   scripts/developer/tests/basicEntityTest/entitySpawner.js
	new file:   scripts/developer/tests/basicEntityTest/shapeSpawner.js
2017-07-25 14:43:07 -04:00
Andrew Meadows
4994283247 remove unnecessary state check 2017-07-24 16:00:13 -07:00
Andrew Meadows
a8dac0cb79 don't send constant updates for grabbed objects 2017-07-20 15:45:50 -07:00
Andrew Meadows
d9c6126000 more descriptive names for methods that do stuff
also: changes to dimensions will trigger update to QueryAACube
2017-07-19 13:33:32 -07:00
Andrew Meadows
2299bb7718 supply minimum shape rather than null 2017-07-06 10:37:44 -07:00
Seth Alves
428dc81083 Merge pull request #10696 from AndrewMeadows/avoid-ownership-bid-race
ignore remote update younger than recent ownership bid
2017-06-20 10:42:54 -07:00
Brad Davis
a69cf31f4b PR feedback and cmake fixes 2017-06-16 16:59:58 -07:00
Andrew Meadows
b105ad8338 measure linear velocity of tractor position 2017-06-16 16:55:00 -07:00
Howard Stearns
a0ea306aed cleanup, and include missing allowBackface parameter 2017-06-04 07:55:23 -07:00
Howard Stearns
c48b729527 Merge branch 'master' of https://github.com/highfidelity/hifi into do-not-get-stuck-in-floor 2017-06-02 18:05:20 -07:00
Seth Alves
142739eec7 Merge pull request #10602 from AndrewMeadows/simulation-ownership-002
fixes for some simulation ownership problems
2017-06-02 14:23:19 -07:00
Andrew Meadows
29a05d7eb4 bid immediately when creating new entity
also clear EntityMotionState::_numInactiveUpdates on new ownership
2017-06-01 17:39:21 -07:00
Andrew Meadows
74827fc4c8 recently moved static objects added to changelist
since static objects are not active this will make the interface
release ownership of recently changed static objects
2017-06-01 17:39:21 -07:00
Andrew Meadows
e34f979ed9 add EntityMotionState::isLocallyOwned() for cleaner logic 2017-06-01 17:39:21 -07:00
howard-stearns
6b2e4c5abc zaru stuff 2017-06-01 17:08:22 -07:00
howard-stearns
1e1dd3a633 checkpoint with working detector 2017-05-31 17:10:37 -07:00
Andrew Meadows
971855e6bf add asserts to catch dangling pointers sooner 2017-05-25 14:29:14 -07:00
Andrew Meadows
c22e4ef883 rename method to clarify where it is called 2017-05-25 13:48:19 -07:00
Andrew Meadows
5378cbead6 make ObjectMotionState dtor virtual 2017-05-25 13:47:03 -07:00
Brad Hefta-Gaub
23af6294ab Merge pull request #10521 from sethalves/fix-locked-in-motion
if something is locked but in motion, make it kinematic rather than static
2017-05-25 08:32:30 -07:00
Seth Alves
3825830fac if something is locked but in motion, make it kinematic rather than static 2017-05-22 14:07:53 -07:00
samcake
f8c291ee78 Merge branch 'master' of https://github.com/highfidelity/hifi into ambient 2017-05-22 10:56:00 -07:00
Seth Alves
4142d8c686 actions shouldn't change locked entities 2017-05-21 11:05:18 -07:00
Sam Cake
321f74c305 Merge branch 'master' of https://github.com/highfidelity/hifi into ambient 2017-05-20 18:12:58 -07:00
Seth Alves
8f38ea8c6a force locked entities to be static in bullet 2017-05-20 11:54:42 -07:00
samcake
c449229850 Cleaned up the counters for memory 2017-05-19 17:52:56 -07:00
Andrew Meadows
09433a93ba Merge pull request #10477 from AndrewMeadows/correct-avatar-mass
More correct avatar mass
2017-05-17 16:22:06 -07:00
Seth Alves
9b1fe60b7c suppress frequest log-spam from constraints. 2017-05-17 11:55:31 -07:00
Andrew Meadows
d065b569d3 support for variable avatar mass by size 2017-05-16 16:03:51 -07:00
Andrew Meadows
9b3754c2ee remove unused API from ObjectDynamic and friends 2017-05-15 22:13:03 -07:00
Andrew Meadows
9e08dadaf4 Remove ObjectActionSpring 2017-05-15 22:11:42 -07:00
Seth Alves
fcc5e12211 redelete these 2017-05-12 13:19:15 -07:00
Seth Alves
f40c7bde71 Merge pull request #9 from AndrewMeadows/motor-action
remove unused parameters from Hinge and ConeTwist constraints
2017-05-12 13:14:02 -07:00
Seth Alves
630d95a812 fix constraint import some more 2017-05-12 13:03:51 -07:00
Andrew Meadows
10d058af02 remove unused parameters from ObjectConstraintConeTwist 2017-05-12 12:07:34 -07:00
Andrew Meadows
18b1bb8b7f remove unused parameters from ObjectConstraintHinge 2017-05-12 12:04:08 -07:00
Seth Alves
bc6fb182eb pull out motor action, fix import of slider and cone-twist constraints 2017-05-12 10:32:28 -07:00
Seth Alves
80e6edda0c code review 2017-05-11 10:13:15 -07:00
Seth Alves
b285a582bd oops 2017-05-09 10:37:45 -07:00
Seth Alves
4f24a7618a cleanups 2017-05-09 10:23:04 -07:00
Seth Alves
1e1968357a Merge branch 'master' of github.com:highfidelity/hifi into motor-action 2017-05-09 09:24:50 -07:00
Seth Alves
55056e730a guard slider and cone-twist constraints against zero-length axisq 2017-05-08 17:02:37 -07:00
Seth Alves
de589a32f3 clone spring action into one called tractor and use tractor is most places. this frees us to fix the math in spring so that it's actually a spring 2017-05-08 16:36:51 -07:00
Seth Alves
94dfbc81f3 entity export/import involving constraints now works 2017-05-08 15:44:31 -07:00
Andrew Meadows
e44c2c8da3 init zero gravity to agree with init hover state 2017-05-08 12:47:32 -07:00
Seth Alves
fd238f5438 working on fixing action/constraint export/import 2017-05-08 11:02:35 -07:00
Andrew Meadows
d9e893ac21 minior optimization/cleanup 2017-05-08 11:02:11 -07:00
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
Brad Davis
ecfe56085d GLM update and GLI integration 2016-09-09 10:18:15 -07:00
Seth Alves
d4faf69beb don't cripple interface with log-spam 2016-09-08 15:42:42 -07:00
Andrew Meadows
bc56df0be1 out-of-body with reduced recovery speeds 2016-09-08 14:31:31 -07:00
Seth Alves
25f6e1d79d Merge branch 'master' of github.com:highfidelity/hifi into arrow-actions 2016-09-01 15:06:52 -07:00
Stephen Birarda
b660a82cc7 fix physics compile for android 2016-08-31 16:55:31 -07:00
Seth Alves
7d13f9220c fix math, renamed a couple variables 2016-08-30 09:55:42 -07:00
Seth Alves
55b68ad4b1 fix warning 2016-08-29 10:21:58 -07:00
Seth Alves
a729a95378 fix math 2016-08-28 21:03:32 -07:00
Seth Alves
670e85994d fix arrow action 2016-08-28 20:05:29 -07:00
Seth Alves
3fb10d0eea action for arrow flight, etc 2016-08-28 19:08:13 -07:00
Andrew Meadows
502146b171 distribute reg offset to compound children 2016-08-24 22:26:56 -07:00
Andrew Meadows
19cd4648ad scale collision render mesh correctly 2016-08-24 22:26:56 -07:00
Andrew Meadows
d801b3521c fix warnings on windows 2016-08-24 22:26:56 -07:00
Andrew Meadows
269b7ae7c1 remove commented out cruft 2016-08-24 22:26:56 -07:00
Andrew Meadows
1f84ef3053 compute normals for collision mesh geometry 2016-08-24 22:26:56 -07:00
Andrew Meadows
26f5d3cfaa fix render geometry for collision shapes 2016-08-24 22:26:56 -07:00
Andrew Meadows
daff897fc4 const shapes, and use *MotionState::setShape() 2016-08-24 22:26:56 -07:00
Andrew Meadows
25fb7aacad ShapeManager hands out const shape pointers 2016-08-24 22:26:56 -07:00
Andrew Meadows
726928c14c creae collision Geometry from mesh 2016-08-24 22:25:45 -07:00
Andrew Meadows
b2dfa49a6f stubbery for alerting entity that shape changed 2016-08-24 22:25:45 -07:00
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
Anthony J. Thibault
8bfa80d5fc Merge remote-tracking branch 'upstream/master' into tony/hmd-recenter-on-rotation 2016-01-22 13:37:43 -08:00
Anthony J. Thibault
61b760038a Address feedback from code review 2016-01-22 11:54:28 -08:00
Seth Alves
b6af8ee0cc Merge branch 'master' of github.com:highfidelity/hifi into avatar-updates-query-cube 2016-01-22 11:46:17 -08:00
Seth Alves
7a3401a8d7 Merge pull request #6867 from AndrewMeadows/collision-group-prep
cleanup in preparation for smarter collision grouping
2016-01-22 11:45:42 -08:00
Andrew Meadows
d8fb61e820 fix crash when deleting entities quickly 2016-01-22 10:25:10 -08:00
Anthony J. Thibault
ca8a832818 CharacterController: added hard limit to follow displacement
To prevent tunneling when the rigid body cannot reach it's target due to being blocked by a wall or some other obstacle.

Also, added unit tests for physics/BulletUtil rotateVector and clampLength functions.
2016-01-21 17:27:45 -08:00
Brad Hefta-Gaub
1a98ab3fba Merge pull request #6877 from AndrewMeadows/crash-fix
fix interface crash when deleting lots of objects at once
2016-01-21 16:49:21 -08:00
Anthony J. Thibault
a91c181a89 MyAvatar: Recenter when the head turns away from the hips
Compute HMD facing moving average.
When the moving average diverges from the hips by more then 45 degrees, recenter the body.

Also, the follow code has been changed, instead of a follow velocity being passed to the CharacterController
a desired target is passed.  The CharacterController homes toward it's target based on the time remaining.
Any follow deltas applied to move the avatar's position closer to it's target is stored and re-applied
to the bodySensorMatrix.  This centralizes the moving/homing code to one place, the CharacterContoller.

A new FollowHelper class was also introduced, it groups together the data and logic necessary to perform the
re-centering/follow procedure.  This "hopefully" makes it easier to maintain.
2016-01-21 16:38:42 -08:00
Seth Alves
872a00d518 entities that are children shouldn't (at this point) be dynamic. 2016-01-21 15:53:47 -08:00
Leonardo Murillo
098b7a4ff3 Merge pull request #6870 from birarda/console
Your Stack Manager is now a Server Console
2016-01-21 14:31:34 -06:00
Andrew Meadows
e77189fb1b keep reference to removed entity until next frame 2016-01-20 17:09:37 -08:00
Andrew Meadows
a92c512c17 move collision group/mask calculus into EntityItem 2016-01-19 19:52:08 -08:00
Stephen Birarda
8bc063e758 Merge branch 'master' of https://github.com/highfidelity/hifi into console 2016-01-19 16:21:19 -08:00
Seth Alves
09dd3e2a56 merge from upstream, respond to code review 2016-01-19 14:38:22 -08:00
Andrew Meadows
7fb145e819 namechange ignoreForCollisions --> collisionless 2016-01-19 09:06:17 -08:00
Stephen Birarda
275fa1c5c7 fix for override warnings with clang on OS X 2016-01-15 15:41:34 -08:00
Andrew Meadows
952f5b23f6 namechange collisionsWillMove --> dynamic 2016-01-15 15:21:25 -08:00
Andrew Meadows
8b420adbc8 namechange MotionType to PhysicsMotionType 2016-01-15 15:21:25 -08:00
Andrew Meadows
b9352d3eaa prevent nan inside spring action 2016-01-15 08:44:52 -08:00
Andrew Meadows
72928fdbd6 fix problem where grab stops on slow movement 2016-01-14 10:42:27 -08:00
U-GAPOS\andrew
0126684a96 collisionMask shouldn't override ignoreForCollisions 2016-01-13 16:58:34 -08:00
Andrew Meadows
6a5a74700f activate sprung objects when action strong enough 2016-01-12 15:11:27 -08:00
Andrew Meadows
2288d96868 fix CharacterController ray cast for floor 2016-01-12 15:11:27 -08:00
Andrew Meadows
6c49d81475 collision mask bit reinterpretation
also cache sessionID in static methods inside PhysicsEngine
2016-01-12 15:08:52 -08:00
Andrew Meadows
502921e877 more consistency for collision group values 2016-01-12 15:08:52 -08:00
Andrew Meadows
c9b125612c fix bugs 2016-01-12 15:08:52 -08:00
Andrew Meadows
e1ba4ff0a8 add CollisionMask entity property 2016-01-12 15:08:52 -08:00
Seth Alves
bc538a0f7d Merge pull request #6756 from AndrewMeadows/physics-cleanup-003
more correct management of MotionState pointers
2016-01-07 11:04:28 -08:00
Seth Alves
cf9af462b5 replace some logging with an assert 2016-01-07 10:21:39 -08:00
Andrew Meadows
42711e5bad remove unused variable 2016-01-07 10:20:03 -08:00
Andrew Meadows
36e19b43c9 add some comments; specify const and overrides 2016-01-07 10:19:46 -08:00
Andrew Meadows
4f29156da1 fixing asserts for EntityItem delete pipeline 2016-01-07 10:19:46 -08:00
Andrew Meadows
6a642bdcf8 fix misusage of smart-pointers 2016-01-07 10:19:46 -08:00
Andrew Meadows
6eb177091b overhaul of MotionState cleanup
Moved MotionState deletes out of PhysicsEngine.
EntityMotionStates are deleted by the PhysicsEntitySimulation.
AvatarMotionStates are deleted in the Avatar dtor.
2016-01-07 10:19:46 -08:00
Andrew Meadows
8886f48c78 minor cleanup 2016-01-07 10:19:46 -08:00
Andrew Meadows
f5d24a87ca remove entities from physics before we delete them 2016-01-07 10:19:46 -08:00
Andrew Meadows
b34df211df cleanup API for removal from EntitySimulation 2016-01-07 10:19:46 -08:00
Andrew Meadows
4208380d1c namechange 2016-01-07 10:19:46 -08:00
Seth Alves
b873d92469 try harder to ensure that a held object is active in bullet 2016-01-06 14:12:58 -08:00
Seth Alves
cd82383d33 Merge branch 'master' of github.com:highfidelity/hifi into improve-grab-action-reliability 2016-01-05 11:13:38 -08:00
Seth Alves
96f506a98d code review 2016-01-05 07:27:27 -08:00
Seth Alves
f5bc58f606 back out off-brand change 2016-01-03 08:00:31 -08:00
Seth Alves
2c21092808 be more careful about locking 2016-01-03 07:59:49 -08:00
Seth Alves
1d9f3097da trying to track down why equips fail after a few minutes 2015-12-21 15:16:55 -08:00
Seth Alves
c84fa5f821 cleanups 2015-12-21 14:45:18 -08:00
Seth Alves
1d9a81d5d4 Merge branch 'master' of github.com:highfidelity/hifi into near-grab-via-parenting 2015-12-21 09:14:37 -08:00
Seth Alves
d71cecbc61 Merge pull request #6675 from AndrewMeadows/crash-fix
fix crash when visiting new domain with gun in hand
2015-12-20 06:24:44 -08:00
Seth Alves
701f99d28e only send a queryAACube for entities to entity-server 2015-12-18 16:28:11 -08:00
Seth Alves
688448fe41 more queryAABox experimenting 2015-12-17 16:18:41 -08:00
Seth Alves
473212e5b7 try to be more coherent about queryAABox meaning 2015-12-17 14:29:41 -08:00
Seth Alves
b83579e6e5 include queryAABox in physics-induced sends 2015-12-16 17:25:49 -08:00
Andrew Meadows
ff83f8fc37 fix crash mode when leaving domain with handgun 2015-12-16 15:11:47 -08:00
Seth Alves
d3c57821c0 call a method on actions before each physics simulation step. use this to attempt to dejitter held objects 2015-12-16 14:00:04 -08:00
Atlante45
ce51350b65 Fix warnings on windows 64bit 2015-12-11 15:42:15 -08:00
Atlante45
a07d7494f0 More OS X warning cleanup 2015-12-11 14:20:36 -08:00
Andrew Meadows
9e99bff250 fix avatar upward drift after shape change 2015-12-09 18:09:55 -08:00
Andrew Meadows
8c109fd623 move raw bullet code from interface to physics lib 2015-12-08 17:21:43 -08:00
Atlante45
1d498af76e Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-12-04 15:18:25 -08:00
Seth Alves
6eae98fb28 merge from upstream 2015-12-02 14:38:26 -08:00
Andrew Meadows
ab6367ff4e remove debug option for disabling physics updates 2015-12-01 11:13:01 -08:00
Stephen Birarda
2acfbd0f8f revert accidental CCD change 2015-11-30 15:52:03 -08:00
Stephen Birarda
f07314f4ef resolve conflicts on merge with huffman/baseball 2015-11-30 13:34:36 -08:00
Seth Alves
4add3e2e91 rework worldToLocal, start on allowing scripts entity position/rotation to always be in world space 2015-11-30 09:41:15 -08:00
Seth Alves
ca75802b9c unmangle merge 2015-11-26 06:43:28 -08:00
Andrew Meadows
527408c7c1 Merge pull request #6292 from huffman/physics-continuous-collision-detection
Physics continuous collision detection
2015-11-25 15:45:18 -08:00
Andrew Meadows
e26081e981 always update physics properties when they change
and move activation check logic to MotionState
2015-11-24 10:20:19 -08:00
Andrew Meadows
5135c9dded whitespace cleanup 2015-11-24 10:20:19 -08:00