mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Tweaked feature scales, send recalibrate request on reset.
This commit is contained in:
parent
679926ce42
commit
5e23c79192
4 changed files with 15 additions and 2 deletions
|
@ -3077,6 +3077,7 @@ void Application::resetSensors() {
|
|||
_serialHeadSensor.resetAverages();
|
||||
}
|
||||
_webcam.reset();
|
||||
_faceshift.reset();
|
||||
QCursor::setPos(_headMouseX, _headMouseY);
|
||||
_myAvatar.reset();
|
||||
_myTransmitter.resetLevels();
|
||||
|
|
|
@ -170,8 +170,10 @@ void Head::simulate(float deltaTime, bool isMine, float gyroCameraSensitivity) {
|
|||
|
||||
// set these values based on how they'll be used. if we use faceshift in the long term, we'll want a complete
|
||||
// mapping between their blendshape coefficients and our avatar features
|
||||
_averageLoudness = faceshift->getMouthSize();
|
||||
_browAudioLift = faceshift->getBrowHeight();
|
||||
const float MOUTH_SIZE_SCALE = 2500.0f;
|
||||
_averageLoudness = faceshift->getMouthSize() * faceshift->getMouthSize() * MOUTH_SIZE_SCALE;
|
||||
const float BROW_HEIGHT_SCALE = 0.005f;
|
||||
_browAudioLift = faceshift->getBrowHeight() * BROW_HEIGHT_SCALE;
|
||||
|
||||
} else {
|
||||
const float AUDIO_AVERAGING_SECS = 0.05;
|
||||
|
|
|
@ -21,6 +21,14 @@ Faceshift::Faceshift() : _enabled(false), _eyeGazeLeftPitch(0.0f), _eyeGazeLeftY
|
|||
connect(&_socket, SIGNAL(readyRead()), SLOT(readFromSocket()));
|
||||
}
|
||||
|
||||
void Faceshift::reset() {
|
||||
if (isActive()) {
|
||||
string message;
|
||||
fsBinaryStream::encode_message(message, fsMsgCalibrateNeutral());
|
||||
send(message);
|
||||
}
|
||||
}
|
||||
|
||||
void Faceshift::setEnabled(bool enabled) {
|
||||
if ((_enabled = enabled)) {
|
||||
connectSocket();
|
||||
|
|
|
@ -42,6 +42,8 @@ public:
|
|||
|
||||
float getMouthSize() const { return _mouthSize; }
|
||||
|
||||
void reset();
|
||||
|
||||
public slots:
|
||||
|
||||
void setEnabled(bool enabled);
|
||||
|
|
Loading…
Reference in a new issue