History

starting to add faceshift head mouse

PhilipRosedale committed 13 years ago

Commit 7dd1a751 parent 37b60a91 file · +14 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+14−2
@@ -2071,9 +2071,21 @@ void Application::updateAvatar(float deltaTime) { · 2070 unmodified lines
20712071 // Update my avatar's state from gyros and/or webcam
20722072 _myAvatar.updateFromGyrosAndOrWebcam(Menu::getInstance()->isOptionChecked(MenuOption::GyroLook),
20732073 _pitchFromTouch);
2074−
2074+
2075+ // Update head mouse from faceshift if active
2076+ if (_faceshift.isActive()) {
2077+ //glm::quat headRotation = _faceshift.getHeadRotation();
2078+ /*
2079+ _headMouseX = _glWidget->getWidth() / 2 + _faceshift.getHeadAngularVelocity()
2080+ _headMouseX = max(_headMouseX, 0);
2081+ _headMouseX = min(_headMouseX, _glWidget->width());
2082+ _headMouseY = max(_headMouseY, 0);
2083+ _headMouseY = min(_headMouseY, _glWidget->height());
2084+ */
2085+
2086+ }
20752087 if (_serialHeadSensor.isActive()) {
2076−
2088+
20772089 // Grab latest readings from the gyros
20782090 float measuredPitchRate = _serialHeadSensor.getLastPitchRate();
20792091 float measuredYawRate = _serialHeadSensor.getLastYawRate();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t