Merge pull request #15814 from hyperlogic/bug-fix/twitchy-finger-fix

Disable handTouch.js to prevent finger twitching
This commit is contained in:
Anthony Thibault 2019-06-20 17:03:39 -07:00 committed by GitHub
commit 64a77d07e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 96 additions and 2 deletions

View file

@ -53,6 +53,9 @@ Item {
StatText {
text: root.recenterText
}
StatText {
text: root.overrideJointText
}
StatText {
text: "Anim Vars:--------------------------------------------------------------------------------"
}
@ -98,6 +101,9 @@ Item {
StatText {
text: root.sittingText
}
StatText {
text: root.flowText
}
StatText {
text: "State Machines:---------------------------------------------------------------------------"
}
@ -131,6 +137,9 @@ Item {
StatText {
text: root.walkingText
}
StatText {
text: root.networkGraphText
}
StatText {
text: "Alpha Values:--------------------------------------------------------------------------"
}

View file

@ -6100,6 +6100,30 @@ QVariantList MyAvatar::getCollidingFlowJoints() {
return result;
}
int MyAvatar::getOverrideJointCount() const {
if (_skeletonModel) {
return _skeletonModel->getRig().getOverrideJointCount();
} else {
return 0;
}
}
bool MyAvatar::getFlowActive() const {
if (_skeletonModel) {
return _skeletonModel->getRig().getFlowActive();
} else {
return false;
}
}
bool MyAvatar::getNetworkGraphActive() const {
if (_skeletonModel) {
return _skeletonModel->getRig().getNetworkGraphActive();
} else {
return false;
}
}
void MyAvatar::initFlowFromFST() {
if (_skeletonModel->isLoaded()) {
auto &flowData = _skeletonModel->getHFMModel().flowData;

View file

@ -1835,6 +1835,10 @@ public:
*/
Q_INVOKABLE QVariantList getCollidingFlowJoints();
int getOverrideJointCount() const;
bool getFlowActive() const;
bool getNetworkGraphActive() const;
public slots:
/**jsdoc

View file

@ -94,6 +94,21 @@ void AnimStats::updateStats(bool force) {
}
emit walkingTextChanged();
// print current overrideJointText
int overrideJointCount = myAvatar->getOverrideJointCount();
_overrideJointText = QString("Override Joint Count: %1").arg(overrideJointCount);
emit overrideJointTextChanged();
// print current flowText
bool flowActive = myAvatar->getFlowActive();
_flowText = QString("Flow: %1").arg(flowActive ? "enabled" : "disabled");
emit flowTextChanged();
// print current networkGraphText
bool networkGraphActive = myAvatar->getNetworkGraphActive();
_networkGraphText = QString("Network Graph: %1").arg(networkGraphActive ? "enabled" : "disabled");
emit networkGraphTextChanged();
// update animation debug alpha values
QStringList newAnimAlphaValues;
qint64 now = usecTimestampNow();

View file

@ -25,6 +25,9 @@ class AnimStats : public QQuickItem {
Q_PROPERTY(QString recenterText READ recenterText NOTIFY recenterTextChanged)
Q_PROPERTY(QString sittingText READ sittingText NOTIFY sittingTextChanged)
Q_PROPERTY(QString walkingText READ walkingText NOTIFY walkingTextChanged)
Q_PROPERTY(QString overrideJointText READ overrideJointText NOTIFY overrideJointTextChanged)
Q_PROPERTY(QString flowText READ flowText NOTIFY flowTextChanged)
Q_PROPERTY(QString networkGraphText READ networkGraphText NOTIFY networkGraphTextChanged)
public:
static AnimStats* getInstance();
@ -43,6 +46,9 @@ public:
QString recenterText() const { return _recenterText; }
QString sittingText() const { return _sittingText; }
QString walkingText() const { return _walkingText; }
QString overrideJointText() const { return _overrideJointText; }
QString flowText() const { return _flowText; }
QString networkGraphText() const { return _networkGraphText; }
public slots:
void forceUpdateStats() { updateStats(true); }
@ -58,6 +64,9 @@ signals:
void recenterTextChanged();
void sittingTextChanged();
void walkingTextChanged();
void overrideJointTextChanged();
void flowTextChanged();
void networkGraphTextChanged();
private:
QStringList _animAlphaValues;
@ -76,6 +85,9 @@ private:
QString _recenterText;
QString _sittingText;
QString _walkingText;
QString _overrideJointText;
QString _flowText;
QString _networkGraphText;
};
#endif // hifi_AnimStats_h

View file

@ -2025,6 +2025,9 @@ void Rig::updateFromControllerParameters(const ControllerParameters& params, flo
if (params.isTalking) {
if (_talkIdleInterpTime < 1.0f) {
_talkIdleInterpTime += dt / TOTAL_EASE_IN_TIME;
if (_talkIdleInterpTime > 1.0f) {
_talkIdleInterpTime = 1.0f;
}
float easeOutInValue = _talkIdleInterpTime < 0.5f ? 4.0f * powf(_talkIdleInterpTime, 3.0f) : 4.0f * powf((_talkIdleInterpTime - 1.0f), 3.0f) + 1.0f;
_animVars.set("idleOverlayAlpha", easeOutInValue);
} else {
@ -2033,6 +2036,9 @@ void Rig::updateFromControllerParameters(const ControllerParameters& params, flo
} else {
if (_talkIdleInterpTime < 1.0f) {
_talkIdleInterpTime += dt / TOTAL_EASE_OUT_TIME;
if (_talkIdleInterpTime > 1.0f) {
_talkIdleInterpTime = 1.0f;
}
float easeOutInValue = _talkIdleInterpTime < 0.5f ? 4.0f * powf(_talkIdleInterpTime, 3.0f) : 4.0f * powf((_talkIdleInterpTime - 1.0f), 3.0f) + 1.0f;
float talkAlpha = 1.0f - easeOutInValue;
_animVars.set("idleOverlayAlpha", talkAlpha);
@ -2287,6 +2293,24 @@ void Rig::buildAbsoluteRigPoses(const AnimPoseVec& relativePoses, AnimPoseVec& a
}
}
int Rig::getOverrideJointCount() const {
int count = 0;
for (size_t i = 0; i < _internalPoseSet._overrideFlags.size(); i++) {
if (_internalPoseSet._overrideFlags[i]) {
count++;
}
}
return count;
}
bool Rig::getFlowActive() const {
return _internalFlow.getActive();
}
bool Rig::getNetworkGraphActive() const {
return _sendNetworkNode;
}
glm::mat4 Rig::getJointTransform(int jointIndex) const {
static const glm::mat4 IDENTITY;
if (isIndexValid(jointIndex)) {

View file

@ -246,6 +246,10 @@ public:
float getUnscaledEyeHeight() const;
void buildAbsoluteRigPoses(const AnimPoseVec& relativePoses, AnimPoseVec& absolutePosesOut) const;
int getOverrideJointCount() const;
bool getFlowActive() const;
bool getNetworkGraphActive() const;
signals:
void onLoadComplete();

View file

@ -17,7 +17,8 @@
(function () {
var LEAP_MOTION_NAME = "LeapMotion";
var handTouchEnabled = true;
// Hand touch is disabled due to twitchy finger bug when walking near walls or tables. see BUGZ-154.
var handTouchEnabled = false;
var leapMotionEnabled = Controller.getRunningInputDeviceNames().indexOf(LEAP_MOTION_NAME) >= 0;
var MSECONDS_AFTER_LOAD = 2000;
var updateFingerWithIndex = 0;

View file

@ -17,7 +17,8 @@
(function () {
var LEAP_MOTION_NAME = "LeapMotion";
var handTouchEnabled = true;
// Hand touch is disabled due to twitchy finger bug when walking near walls or tables. see BUGZ-154.
var handTouchEnabled = false;
var leapMotionEnabled = Controller.getRunningInputDeviceNames().indexOf(LEAP_MOTION_NAME) >= 0;
var MSECONDS_AFTER_LOAD = 2000;
var updateFingerWithIndex = 0;