mirror of
https://github.com/overte-org/overte.git
synced 2025-04-06 22:32:57 +02:00
cleanups
This commit is contained in:
parent
10ddbecdb9
commit
552b69bb1c
4 changed files with 4 additions and 11 deletions
|
@ -1889,6 +1889,7 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
|||
// these angles will be in radians
|
||||
// ... so they need to be converted to degrees before we do math...
|
||||
glm::vec3 euler = glm::eulerAngles(localOrientation) * DEGREES_PER_RADIAN;
|
||||
|
||||
Head* head = getHead();
|
||||
head->setBaseYaw(YAW(euler));
|
||||
head->setBasePitch(PITCH(euler));
|
||||
|
|
|
@ -122,8 +122,7 @@ bool HMDScriptingInterface::getHUDLookAtPosition3D(glm::vec3& result) const {
|
|||
|
||||
glm::mat4 HMDScriptingInterface::getWorldHMDMatrix() const {
|
||||
auto myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
||||
// return myAvatar->getSensorToWorldMatrix() * myAvatar->getHMDSensorMatrix();
|
||||
return myAvatar->getSensorToWorldMatrix() * myAvatar->getHeadControllerPoseInSensorFrame().getMatrix() * Matrices::Y_180;
|
||||
return myAvatar->getSensorToWorldMatrix() * myAvatar->getHMDSensorMatrix();
|
||||
}
|
||||
|
||||
glm::vec3 HMDScriptingInterface::getPosition() const {
|
||||
|
|
|
@ -21,6 +21,7 @@ public:
|
|||
bool beginFrameRender(uint32_t frameIndex) override;
|
||||
float getTargetFrameRate() const override { return 90; }
|
||||
|
||||
|
||||
protected:
|
||||
void updatePresentPose() override;
|
||||
void hmdPresent() override {}
|
||||
|
|
|
@ -286,15 +286,7 @@ bool KinectPlugin::isHandController() const {
|
|||
}
|
||||
|
||||
bool KinectPlugin::isHeadController() const {
|
||||
bool sensorAvailable = false;
|
||||
#ifdef HAVE_KINECT
|
||||
if (_kinectSensor) {
|
||||
BOOLEAN sensorIsAvailable = FALSE;
|
||||
HRESULT hr = _kinectSensor->get_IsAvailable(&sensorIsAvailable);
|
||||
sensorAvailable = SUCCEEDED(hr) && (sensorIsAvailable == TRUE);
|
||||
}
|
||||
#endif
|
||||
return _enabled && _initialized && sensorAvailable;
|
||||
return isHandController();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue