mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 21:56:15 +02:00
Made OR work with different camera modes.
This commit is contained in:
parent
eccf99c175
commit
eb5b0c4ddf
1 changed files with 3 additions and 4 deletions
|
@ -560,10 +560,9 @@ void Application::paintGL() {
|
||||||
_myCamera.setUpShift(0.0f);
|
_myCamera.setUpShift(0.0f);
|
||||||
_myCamera.setDistance(0.0f);
|
_myCamera.setDistance(0.0f);
|
||||||
_myCamera.setTightness(0.0f); // Camera is directly connected to head without smoothing
|
_myCamera.setTightness(0.0f); // Camera is directly connected to head without smoothing
|
||||||
_myCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition());
|
}
|
||||||
_myCamera.setTargetRotation(_myAvatar->getHead()->getCameraOrientation());
|
|
||||||
|
|
||||||
} else if (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON) {
|
if (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON) {
|
||||||
_myCamera.setTightness(0.0f); // In first person, camera follows (untweaked) head exactly without delay
|
_myCamera.setTightness(0.0f); // In first person, camera follows (untweaked) head exactly without delay
|
||||||
_myCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition());
|
_myCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition());
|
||||||
_myCamera.setTargetRotation(_myAvatar->getHead()->getCameraOrientation());
|
_myCamera.setTargetRotation(_myAvatar->getHead()->getCameraOrientation());
|
||||||
|
|
Loading…
Reference in a new issue