Commit graph

159 commits

Author SHA1 Message Date
Anthony Thibault
1e94d9bdf5 interface/src/avatar: cppcheck fixes 2016-03-13 18:56:15 -07:00
Anthony J. Thibault
ab19d3e5a2 Moved animation after physics, hand poses are in world frame.
There are still some debug hacks enabled so I can test in the vive room.
2016-03-10 20:44:35 -08:00
Anthony J. Thibault
807d31743c Removed Hand, HandData & PalmData
Instead, we just store two controller::Poses in MyAvatar.
Existing behavior and scripting APIs have been preserved.

The hand controller debug drawing is slightly different, but still works.
2016-03-10 19:33:31 -08:00
Seth Alves
74452bc890 put back some code that shouldn't have been removed 2016-02-25 15:34:50 -08:00
Seth Alves
8f304d95b3 rather than computing a velocity for entities held by others as a way to keep it active in local bullet, just call activateBody over and over 2016-02-25 15:26:42 -08:00
Anthony J. Thibault
62ed5333e0 AvatarActionHold: compute velocities for other avatars 2016-02-24 15:14:56 -08:00
Seth Alves
e1b10e79df don't crash when watching someone else near-grab something 2016-02-24 12:09:51 -08:00
Anthony J. Thibault
0fd260076b SixenseManager: fix velocity and angularVelocity computation
Copied the delta based computation of velocity and angularVelocity that was in
Application::setPalmData() and moved it into SixenseManager.  This will guarantee
that the velocity computation is the same as it was previously.  The goal here is
to NOT change the behavior of the hydra.

The moving average style calculation of velocities has been removed.

Removed dead code.
2016-02-22 20:05:41 -08:00
Anthony Thibault
3b87cd0ea8 Improve hold action by using controller velocity
The AvatarHoldAction now derives the body velocity by using data from the controller::Pose.  Rather then trying to derive it based on previous positions.  This results in more acurate motion of the held object when the hold is released.

OpenVR input plugin: pass the velocity and angularVelocity directly from the controller pose to the controller::Pose.
2016-02-22 19:15:22 -08:00
Anthony J. Thibault
ec2f8db83a Avatar: Fix for one frame lag in hold action
AvatarActionHold now uses the most recent un-cached palm positions/orientations
instead of the cached version from the previous frame.
2016-01-18 17:37:28 -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
5d0604b8d3 activateBody doesn't help if called from inside the action callback, because the callback isn't called on inactive bodies. call it from the setup routine, instead 2016-01-03 07:33:10 -08:00
Brad Hefta-Gaub
0b781a3589 fix warnings 2015-12-17 18:39:05 -08:00
Seth Alves
b80fa1c806 code review 2015-12-17 11:46:41 -08:00
Seth Alves
f3adb8a2f7 fix offset math in hold action 2015-12-17 11:16:59 -08:00
Seth Alves
5f9bdcb2aa fix lock type 2015-12-16 15:52:20 -08:00
Seth Alves
d7affcf811 keep track of palm rotation vs avatar as well as palm translation 2015-12-16 15:41:27 -08:00
Seth Alves
489d4099a7 add locationChanged to model entities 2015-12-16 15:21:20 -08:00
Seth Alves
8bfbb69316 clean up code, change try-locks to locks 2015-12-16 14:21:56 -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
fc77d6cd40 Fix grab behavior 2015-12-07 17:08:36 -08:00
Atlante45
c4e43c4e0b Merge branch 'baseball-test' of github.com:Atlante45/hifi into baseball 2015-12-01 15:16:05 -08:00
Atlante45
f06b5b05b3 Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-12-01 15:14:58 -08:00
Atlante45
70dd8ec19a Remove left/right relative pos/rot from c++ 2015-12-01 11:44:42 -08:00
Seth Alves
7f95e1eec6 make sure observed held objects are active in bullet, disable equip spring action 2015-12-01 10:49:07 -08:00
Seth Alves
11f18c3ada also make sure the holder doesn't end up with a static-in-bullet held object 2015-12-01 09:52:51 -08:00
Atlante45
8d9eeb3897 Have separate left/right hold action offset 2015-11-30 18:04:34 -08:00
Stephen Birarda
4573e5c59e resolve conflicts on merge with upstream/master 2015-11-30 13:32:38 -08:00
Seth Alves
d4937071e1 rather than activating rigid body and forcing non-static on deserialize, just force non-static 2015-11-23 12:17:15 -08:00
Seth Alves
c3821d7202 avoid deadlock 2015-11-23 11:24:56 -08:00
Seth Alves
5612174894 call activateBody when a hold action is deserialized 2015-11-23 11:02:41 -08:00
Seth Alves
b0d24be58f add a way to get a list of all actions of a certain type from an entity. hold actions average their positional targets. 2015-11-13 16:02:39 -08:00
Seth Alves
ac635336b7 split AvatarActionHold's finding of its location target into a new function 2015-11-13 14:58:17 -08:00
Seth Alves
d7be1699a7 adjust how the decision to send action changes over the wire is made 2015-11-12 15:27:10 -08:00
Seth Alves
a8cd891e48 adjust how the decision to send action changes over the wire is made 2015-11-12 14:19:23 -08:00
Atlante45
735fd70a8e Tweak perHandRotation/Position in action 2015-11-10 17:04:53 -08:00
Atlante45
3cbe1bc4da Mirror on x instead of z 2015-11-10 14:50:22 -08:00
Atlante45
d79221edd2 AvatarActionHold can ignore IK 2015-11-10 14:06:59 -08:00
Atlante45
8da8b4db8c Add option to ignore IK for my avatar's entity actions 2015-11-10 13:42:25 -08:00
Atlante45
7050139a56 Bit of code cleanup 2015-11-10 13:41:19 -08:00
Atlante45
765bca9a7b Work on hold action 2015-11-09 18:05:45 -08:00
Atlante45
b3cdee278a Different approach for bat positionning 2015-11-09 16:14:18 -08:00
Ryan Huffman
4ab6536109 Fix Vive dynamic pointer cast compile error on Windows 2015-11-09 15:06:43 -08:00
Atlante45
55c6706f76 Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-06 13:31:39 -08:00
Seth Alves
46b7b92b2f prefix private member variables with _ 2015-11-06 11:54:51 -08:00
Seth Alves
28d4d29bb6 smooth hold action velocity over 2 frames 2015-11-05 15:07:00 -08:00
Atlante45
d9cd986db2 Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-04 11:26:16 -08:00
Seth Alves
270b4b97fc remove a left-over kludge that was causing the appearence of frame-lag in held objects 2015-11-04 02:26:02 -08:00
Atlante45
eb990c9c1c More basebal test code 2015-11-03 17:45:01 -08:00
Atlante45
0508091130 Rebase fixes 2015-11-03 11:37:57 -08:00
Clément Brisset
c63fc8557c More baseball test code 2015-11-03 11:14:59 -08:00
Ryan Huffman
ccb25f4b63 Merge branch 'master' of https://github.com/highfidelity/hifi into baseball 2015-11-03 11:10:45 -08:00
Ryan Huffman
afffe7f5c6 Merge branch 'master' of github.com:Atlante45/hifi into baseball 2015-11-03 11:10:14 -08:00
Clément Brisset
31d92fd90a Baseball test code 2015-11-03 11:00:35 -08:00
Andrew Meadows
f652e983a9 flag kinematic objs when changed in stepSimulation() 2015-10-30 14:53:29 -07:00
Seth Alves
93503d0a21 make kinematic grab set entities kinematic in bullet and update entity position 2015-10-30 11:03:13 -07:00
Seth Alves
8d0aaed41a fix bug that was deleting actions with 0 ttl. in js interface, action parameter 'lifetime' is now called 'ttl' 2015-10-26 13:50:21 -07:00
Seth Alves
c0eccca6d3 relay 'kinematic' mode of a hold to other interfaces 2015-10-21 12:29:26 -07:00
Seth Alves
41f7ef1e2e cleanups 2015-10-19 16:53:27 -07:00
Seth Alves
46e5bf0435 take entity-server clock-skew into account when handling action expiration times 2015-10-19 11:59:03 -07:00
Seth Alves
fe709a9397 keep object active in kinematic mode, also 2015-10-16 10:53:33 -07:00
Seth Alves
966499b9e5 continually activate (in the bullet sense) a held object 2015-10-16 10:17:17 -07:00
Seth Alves
359a318568 fold kinematic hold into normal hold (disabled by default, an argument enables) 2015-10-15 20:23:06 -07:00
Seth Alves
0964180f2c code review 2015-10-15 17:10:47 -07:00
Seth Alves
487131dde1 cleanups 2015-10-15 14:52:38 -07:00
Seth Alves
4903db45b1 give other avatars an anim-skeleton 2015-10-15 14:21:06 -07:00
Seth Alves
1d8db13f41 switch to low-entity-server traffic hold 2015-10-15 10:56:47 -07:00
Seth Alves
64c5cde2d2 further unmangle branch split 2015-10-15 10:33:58 -07:00
Seth Alves
a78728c96b further unmangle branch split 2015-10-15 10:29:25 -07:00
Seth Alves
8195145dc7 further unmangle branch split 2015-10-15 10:13:00 -07:00
Seth Alves
d833fb08d7 further unmangle branch split 2015-10-15 10:03:32 -07:00
Seth Alves
9f40c7bf8c fix up AvatarActionHold 2015-10-15 09:13:06 -07:00
Seth Alves
9937b6a3ef quiet some debugging 2015-10-14 13:12:11 -07:00
Seth Alves
d72152da87 more locking 2015-10-14 13:01:56 -07:00
Seth Alves
07a4dc3a7f more lock fixing 2015-10-14 12:49:06 -07:00
Seth Alves
fa2bf2b2d9 tighten up locking in actions 2015-10-14 11:43:03 -07:00
Seth Alves
2ecb7e8d29 fix bug that was making action deletes fail 2015-10-13 16:19:12 -07:00
Seth Alves
4fa85441b8 tweak 2015-10-13 15:14:34 -07:00
Seth Alves
257e3845de get action type correct 2015-10-13 14:45:20 -07:00
Seth Alves
fcbb107bc0 tweak 2015-10-13 14:13:53 -07:00
Seth Alves
8b72f6e7c6 tweak 2015-10-13 13:50:43 -07:00
Seth Alves
7c52849740 change how hold action works 2015-10-13 11:36:58 -07:00
Seth Alves
7c6846c260 add lifetime and tag arguments to actions 2015-09-30 13:09:41 -07:00
Brad Davis
92eeb564fe PR comments 2015-09-10 20:57:43 -07:00
Brad Davis
aa989c3687 Fixing some entity race condition crashes 2015-09-10 20:53:17 -07:00
Brad Davis
3bc9e8c98d Fixing some entity race condition crashes 2015-09-10 20:43:41 -07:00
Andrew Meadows
9ce9c541de fix activation of object when action changes 2015-07-10 18:45:40 -07:00
Andrew Meadows
9cb7e86877 cleanup of AvatarActionHold deserialization 2015-07-10 12:34:12 -07:00
Seth Alves
2dc4922da3 bring over code from entity-level-locking branch 2015-07-09 15:23:05 -07:00
Seth Alves
5312beeaf4 if an action changes its own arguments, cause reserialisation 2015-07-09 14:50:31 -07:00
Seth Alves
a01fb6f1dc if an action changes its own arguments, cause reserialisation 2015-07-09 14:32:34 -07:00
Seth Alves
d197bf2a85 use palm rotation data in hold action 2015-07-09 12:18:32 -07:00
Seth Alves
08d63b7fd8 first attempt at palm rotation 2015-07-09 11:03:02 -07:00
Andrew Meadows
a0a1b01ea9 coalesce dupe action data members: _id and _type 2015-07-07 17:50:08 -07:00
Andrew Meadows
e9df8cacc7 make some arguments const, cleanup some #includes 2015-07-07 17:50:08 -07:00
Andrew Meadows
77bd7b2821 some ObjectAction methods should be const 2015-07-07 17:50:08 -07:00
Seth Alves
0caa8be66e ignore incoming changes for a hold action that's flagged as 'mine' 2015-06-29 19:50:19 -07:00
Seth Alves
88fc74374b if a hold action is edited by a local script, mark it as 'mine'. if it's not 'mine', let the spring action handle the wire protocol 2015-06-29 19:27:10 -07:00
Seth Alves
a0fd75c54f don't enable hold actions from remote nodes 2015-06-29 16:08:37 -07:00
Seth Alves
fbede0a23f guard against feeding bullet a NaN 2015-06-29 15:54:24 -07:00