Commit graph

261 commits

Author SHA1 Message Date
James B. Pollack
1d3dc7b195 remove particle beam and lights 2016-07-22 09:19:13 -07:00
Seth Alves
be001a652f when doing a parenting grab, zero velocity 2016-07-19 11:50:53 -07:00
Brad Hefta-Gaub
866ba2f185 Merge pull request #8273 from hyperlogic/bug-fix/far-grab-zoom
far-grabbed objects no longer fly away when the avatar body shifts
2016-07-19 10:40:48 -07:00
Anthony J. Thibault
212175bdaa bug fix for far-grab pulling the object in the wrong direction 2016-07-19 10:23:00 -07:00
Anthony J. Thibault
69500643f3 bugfix for saving attach points
The feature to add transition from equip -> near-grab, in inadvertently broke attach point saving.
2016-07-18 14:17:32 -07:00
Anthony J. Thibault
659e1ff984 remove debug prints 2016-07-18 14:17:06 -07:00
Anthony J. Thibault
959a2f9915 far-grabbed objects no longer fly away when the avatar body shifts
Before this fix, a hand vector was being tracked that was the difference between the avatar's hand in avatar space with the avatar's hand
in avatar space the previous frame.  This hand vector was used to move the grabbed object position.  However, when the body shifts, objects
in the avatar's space will change rapidly, this would cause this hand vector to be incorrect and cause the object to shoot off in the distance.

Now, we track this hand delta in sensor a.k.a. room space.  This is immune to the shifts caused by body shifting.
2016-07-18 13:10:16 -07:00
Anthony Thibault
c7c8046231 De-equip goes into a near grab instead of dropping the object. 2016-07-16 14:58:21 -07:00
Anthony Thibault
4b2fb546eb Re-enable storing of attach points in user settings
* bug fix, use localOffset property of grabbed entity, which is dynamically updated as
  the near grab action moves the entity.
2016-07-16 12:21:08 -07:00
Philip Rosedale
4925980cbb Merge pull request #8255 from jherico/search_circle
Make search line termination a circle, like 2D UI
2016-07-15 17:51:50 -07:00
Brad Davis
1145c3b590 Smaller and hotter circle, per Philip 2016-07-15 17:45:16 -07:00
Seth Alves
a0e6654ac6 Merge pull request #8247 from hyperlogic/feature/grab-script-polish-part-deux
Grab Script Polish (part deux)
2016-07-15 17:34:50 -07:00
Anthony Thibault
e4794450c2 Disable attach point saving 2016-07-15 15:36:20 -07:00
Brad Davis
0d811c489a Removing debug logging 2016-07-15 14:05:16 -07:00
Brad Davis
c462b8c387 Make search line termination a circle, like 2D UI 2016-07-15 13:51:14 -07:00
Brad Hefta-Gaub
7bb31fe075 Merge pull request #8240 from jherico/hand_controller
Menu & hand controller polish
2016-07-15 12:36:31 -07:00
Anthony J. Thibault
37d60c6c85 eslint clean 2016-07-14 15:58:13 -07:00
Anthony J. Thibault
31f1d69c43 Merge branch 'master' into feature/grab-script-polish-part-deux 2016-07-14 15:57:41 -07:00
Brad Hefta-Gaub
45aa78702c Merge pull request #8217 from sethalves/fix-throwing
fix throwing
2016-07-14 15:52:41 -07:00
Anthony J. Thibault
6094fb3de3 Remember object attach point offsets in user settings 2016-07-14 15:51:05 -07:00
Anthony J. Thibault
eb5107d9a5 highlight the grabbed hotspot when the drop gesture is detected 2016-07-14 12:07:07 -07:00
Anthony J. Thibault
e62d34136d Added haptics and hysteresis to drop gesture 2016-07-14 10:53:47 -07:00
Anthony J. Thibault
51cce939b3 removed shake to drop 2016-07-14 10:32:02 -07:00
Brad Davis
091e798267 Make hand pointer lasers 'click' on fully pressing and clicking the vive controller 2016-07-14 10:30:35 -07:00
Anthony J. Thibault
23ea85541c Animate equip hotspots scale instead of alpha 2016-07-14 10:24:08 -07:00
Anthony J. Thibault
66830a0538 First pass at equip sphere animation 2016-07-13 19:44:51 -07:00
Anthony J. Thibault
f3ef2801b4 Support for model overrides for equip hotspots rendering
Bug fix for modelScale on hotspots
2016-07-13 19:13:40 -07:00
Anthony J. Thibault
0ce970408c Fix for double rendering of equip hotspots 2016-07-13 19:13:40 -07:00
Anthony J. Thibault
848d5a8975 Reduce calls to Entity.getEntityProperties().
By using a single EntityProprtiesCache instance instead of one per controller.
2016-07-13 19:13:39 -07:00
Brad Hefta-Gaub
819cab4aab Merge pull request #8158 from sethalves/raypick-avatars
Raypick avatars
2016-07-12 15:27:30 -07:00
Seth Alves
1999193907 split the grab script's deactivation on an entity into two parts -- one that happens during release and a delayed part which finishes up. This makes collisions with a thrower's capsule less likely 2016-07-12 11:42:58 -07:00
Seth Alves
367c26a5ee wait a bit before resetting collides-with-my-avatar 2016-07-11 18:53:47 -07:00
Seth Alves
85cc5f8956 Merge branch 'master' of github.com:highfidelity/hifi into raypick-avatars 2016-07-11 18:02:18 -07:00
Seth Alves
84c5bef487 back to ignore more recent 3 frames. don't have released entities collide with myAvatar until 0.25 seconds after release 2016-07-11 17:02:11 -07:00
James B. Pollack
27f70e9d52 finish merge 2016-07-11 15:13:25 -07:00
Seth Alves
c034879b74 Merge branch 'master' of github.com:highfidelity/hifi into fix-throwing 2016-07-11 11:12:20 -07:00
Anthony J. Thibault
6f6fe5f244 reduced radius of grab sphere 2016-07-08 18:23:33 -07:00
Anthony J. Thibault
bec71e4af4 Went back to transparent spheres for equip points 2016-07-08 17:05:23 -07:00
Seth Alves
051616d7c3 experimenting 2016-07-08 16:16:06 -07:00
James B. Pollack
6249f3ed12 less changes to hand grab 2016-07-08 16:01:17 -07:00
James B. Pollack
4f899d8752 play nice with grab 2016-07-08 15:14:04 -07:00
James B. Pollack
5ca14b528b remove prints and format 2016-07-08 15:08:44 -07:00
Anthony J. Thibault
c8d0decab7 Fix for far grab not working until after edit button is pressed 2016-07-08 14:47:13 -07:00
Anthony J. Thibault
7d1f52da70 Added glow effect to search beam 2016-07-08 14:33:22 -07:00
Anthony J. Thibault
9242147394 Merge branch 'master' into feature/grab-script-polish 2016-07-08 13:40:01 -07:00
James B. Pollack
24832df14a changes 2016-07-08 13:13:32 -07:00
Anthony J. Thibault
1ec3472230 Model overlay dimensions fixes
At the moment model overlays will ALWAYS scale to fit their dimensions
Update handControllerGrab to account for this behavior.
2016-07-08 11:36:43 -07:00
James B. Pollack
1a46366557 uncomment 2016-07-07 19:23:04 -07:00
James B. Pollack
f8ff0da901 trying to fix interaction with grab script... 2016-07-07 19:22:42 -07:00
Anthony J. Thibault
0d454cd45e Equip hotspots render when your hand is near them. 2016-07-07 17:28:23 -07:00
Seth Alves
6786a07ac2 Merge branch 'master' of github.com:highfidelity/hifi into raypick-avatars 2016-07-07 09:53:24 -07:00
Anthony J. Thibault
2db8160568 handControllerGrab improvements
* Made handControllerGrab eslint clean
* A model overlay is used instead of a sphere to draw equip hotspots.
* The equip hotspot model will grow in size by 10% when hand is near enough to equip it.
* The hand controller will now perform a haptic pulse when your hand is near enough to an equip hotspot.
* Near triggers events will also perform a haptic pulse
2016-07-06 15:46:14 -07:00
howard-stearns
110f5e9e2a Don't compare distance when no intersection. 2016-07-06 15:08:57 -07:00
howard-stearns
b8e6572ebf basic hand-controller editing 2016-07-05 17:00:54 -07:00
Seth Alves
5ab82cd7c8 Merge branch 'master' of github.com:highfidelity/hifi into raypick-avatars 2016-07-02 15:11:59 -07:00
Anthony J. Thibault
d8e5e3cbe4 equip bug fix
you should not be able to equip an object that is already equipped, with your other hand.
2016-06-30 16:00:18 -07:00
Anthony J. Thibault
82b1cba81d equip improvements
Allow the user to equip an object while near or far grabbing it from the other hand.
2016-06-30 13:58:44 -07:00
Anthony J. Thibault
6072487c9c Equip-points attachments work
Also made handControllerGrab.js eslint clean.
2016-06-29 17:28:53 -07:00
Anthony J. Thibault
43d4dba4c0 iterate over hotspots not entities.
This makes it possible to render multiple hotspots per entity.
Also, it will use the same logic to decide how to deal with overlapping entity
equip hotspots.
2016-06-29 13:53:07 -07:00
Anthony J. Thibault
1b98c73473 WIP, equip-points work but they don't use the proper attach point. 2016-06-29 13:53:06 -07:00
Anthony J. Thibault
b042210637 Addition of equipHotspots 2016-06-29 13:53:06 -07:00
Seth Alves
52d017ac74 undo previous change 2016-06-28 19:22:19 -07:00
Seth Alves
b782ae667c when one hand adjusts something equippd in the other, print out the new local position and rotation in case a content-creator wants to update userData 2016-06-28 16:36:37 -07:00
Seth Alves
630d5cfc82 make trigger more sensitive, print out position and rotation when releasing something 2016-06-28 15:47:17 -07:00
Anthony J. Thibault
41fcfb45ca Merge branch 'vive-ui' into bug-fix/grab-visualization-improvements 2016-06-24 13:28:00 -07:00
Anthony J. Thibault
8bf72f28da Fix for grab script search ray length 2016-06-24 12:06:02 -07:00
Anthony J. Thibault
7bd553c09c near grab logic to uses sphere vs entity box
instead of sphere vs sphere.  Adjusted debug drawing accordingly.
2016-06-23 17:03:15 -07:00
Anthony J. Thibault
eabb8d08c0 Merge branch 'vive-ui' into feature/equip-hotspots 2016-06-23 15:42:55 -07:00
Anthony J. Thibault
fc42a3aef5 Grab script hotspot work
* Updated grab/equip logic to use sphere vs sphere tests, instead of sphere vs entity bounding box.
* Added debug flag for visualizing grab spheres.
* hotspot overlays are now updated as the objects they are attached to move.
* You can now use the search beam to near grab large objects, as well as the sphere sphere test.
* Optimized EntityPropertyCache to make a single call to Entities.getEntityProperties instead of three.
* Moved grab script options from the "Developer > Hands" menu to the "Developer > Grab Script" menu.
2016-06-23 15:36:47 -07:00
howard-stearns
581d87d653 feedback re magic numbers and variable name. 2016-06-22 16:40:10 -07:00
Anthony J. Thibault
2a82dddc2b Draw attach points as if they were equip-hotspots 2016-06-21 17:36:36 -07:00
Anthony J. Thibault
972c292857 Fix for equip-hotspot being visible for whiteboard markers 2016-06-21 11:59:11 -07:00
Anthony J. Thibault
2ed88bca6d Bug fix for bow and arrow.
* before this change the releaseEquip message was not getting sent to the bow,
  which it would use to re-enable the grab script via the 'Hifi-Hand-Disabler' msg.
2016-06-20 17:24:36 -07:00
Anthony J. Thibault
8817bbea09 reduce log spam 2016-06-20 15:53:33 -07:00
Anthony J. Thibault
e5159ad213 Added "Developer > Hands > Drop Without Shake" menu option 2016-06-20 14:50:15 -07:00
Anthony J. Thibault
408f65100b Bug fix for dropping near-grabbed entities via thump press. 2016-06-20 13:34:05 -07:00
Anthony J. Thibault
8792812884 Change raw for loop to Array.prototype.forEach instead 2016-06-20 13:26:41 -07:00
Anthony J. Thibault
359483d9ba coding standard fix 2016-06-20 11:43:42 -07:00
Anthony J. Thibault
a14bbe4e68 Remove /* style multi-line comments 2016-06-20 11:40:59 -07:00
Anthony J. Thibault
35276c3893 Use Array.prototype.filter instead of my hand rolled filter function 2016-06-20 11:30:40 -07:00
Anthony J. Thibault
7ccbc9e6eb Primary thumb press can be used to drop an equipped object 2016-06-20 11:22:56 -07:00
Anthony J. Thibault
14efd5dc12 Disable WANT_DEBUG_STATE 2016-06-20 10:44:09 -07:00
Anthony J. Thibault
1759132377 Use trigger to both grab and equip objects
* Removed entry into HOLD state via secondary aka grip buttons.
* Changed equip logic to prioritize equip over near over far grabs.
* Added drop gesture, upside down controller + slight shake + trigger press
* Bug fix for near grab snapping to an incorrect offset after a far grab (this bug is present in master)
2016-06-20 10:39:07 -07:00
Howard Stearns
faa2624ca7 Merge pull request #8081 from howard-stearns/continue-grabbing-through-overlays
Continue grabbing through overlays
2016-06-15 16:07:01 -07:00
howard-stearns
6f671b7cde see comment. 2016-06-15 15:17:34 -07:00
howard-stearns
1e3b20b66d Explicit check enumerated states instead of relying on order, per
feedback.
2016-06-15 15:06:36 -07:00
Howard Stearns
b9754c8564 continue grabbing through overlays 2016-06-14 20:17:52 -07:00
Anthony J. Thibault
071584597d Merge branch 'vive-ui' into feature/grab-script-preliminaries 2016-06-14 15:33:38 -07:00
Anthony J. Thibault
67aac09033 Set state debug flag to false 2016-06-14 14:59:29 -07:00
Anthony J. Thibault
cb51d00c1d Removed CONTINUE_FAR_TRIGGER and CONTINUE_NEAR_TRIGGER 2016-06-13 19:08:33 -07:00
Anthony J. Thibault
28b6cc2777 handControllerGrab.js is now eslint clean. 2016-06-13 18:54:21 -07:00
howard-stearns
526fc7d062 Make handControllerGrab independent of whether we're using laser or
Reticle.
2016-06-13 17:13:10 -07:00
Anthony J. Thibault
b01eb0439d removed sticky thumb equip states.
* removed STATE_WAITING_FOR_EQUIP_THUMB_RELEASE and waitingForEquipThumbRelease
* removed STATE_EQUIP
* removed STATE_WAITING_FOR_RELEASE_THUMB_RELEASE and waitingForReleaseThumbRelease
* removed 'Hifi-Object-Manipulation' 'loaded' support and checkNewlyLoaded method.
2016-06-13 16:49:38 -07:00
Anthony J. Thibault
fe65df350b Combined the release and off states. 2016-06-13 15:05:34 -07:00
Anthony J. Thibault
bd3326d2fc Collapse continueNearGrabbing and nearGrabbing into a single state.
* Moved the update logic from STATE_NEAR_GRABBING, STATE_HOLD & STATE_EQUIP into the entryMethods
  for those states.
* Removed STATE_CONTINUE_NEAR_GRABBING, STATE_CONTINUE_HOLD & STATE_CONTINUE_EQUIP states
  This functionality has been moved into the updateMethod for their respective states.

This *should* be a pure re-factor no functionality was changed.
2016-06-13 14:40:30 -07:00
Anthony J. Thibault
6d2181f0f1 Combine DISTANCE_HOLDING and CONTINUE_DISTANCE_HOLDING states. 2016-06-13 14:40:30 -07:00
Howard Stearns
b0f6b59207 Merge pull request #8040 from hyperlogic/bug-fix/equip-hotspot-render
Only render equip-hotspots for objects with attach points.
2016-06-13 11:29:39 -07:00
Brad Davis
472a3540d7 Merge remote-tracking branch 'upstream/master' into vive-ui
Conflicts:
	scripts/system/controllers/handControllerGrab.js
2016-06-10 10:43:09 -07:00
Anthony J. Thibault
42068cf2dd Only render equip-hotspots for objects with attach points. 2016-06-08 15:01:53 -07:00
Anthony J. Thibault
b836a580ff Updated some debug print information 2016-06-06 14:40:58 -07:00
Anthony J. Thibault
6d462a477d Change equip-hotspot to a green sphere. 2016-06-06 14:40:57 -07:00
Anthony J. Thibault
c9f440a49d handControllerGrab: initial rendering of equip hot-spots
* When trigger is depressed, any entities that are marked with a wearable equip-point
  will become highlighted by a wireframe box (temporary art).
* The grab state machine is now defined by the CONTROLLER_STATE_MACHINE object.
  this includes each state's name and updateMethod name.
* Support was added for entry and exit methods when changing states, this
  functionality is used to draw and delete the hot spots when entering
  and exiting the searching state.
2016-06-06 14:40:57 -07:00
SamGondelman
4fb8eac8ea much better way of fixing script 2016-06-03 18:12:47 -07:00
SamGondelman
2367cb1995 fixing input mapping for vive/touch grip button/trigger, script needs fixing 2016-06-03 15:07:21 -07:00
howard-stearns
9ad19a2eaf Draw grab balls in front of entities (not just the lines as before).
Don't intersect with grab balls (not just lasers as before).
Don't run grab lasers through (2d or 3d) overlays.
Don't try to manage reticle in handControllerGrab because other scripts
do.
2016-05-31 14:57:31 -07:00
Seth Alves
a24d63a39c make distance-grab work better when avatar is walking 2016-05-20 15:45:00 -07:00
Seth Alves
009c288745 revert a change from previous fixes -- non-dynamic things should have to opt-into being grabbable. dynamic things have to opt-out 2016-05-12 13:29:40 -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
44beca1687 try having all spring derived actions agree on a target 2016-05-04 11:29:17 -07:00
Seth Alves
ec554c3c0b Merge branch 'master' of github.com:highfidelity/hifi into grab-fixes 2016-05-01 17:28:20 -07:00
James B. Pollack
06171f6063 move default to system 2016-04-26 14:47:02 -07:00
Renamed from scripts/default/controllers/handControllerGrab.js (Browse further)