mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:28:37 +02:00
Merge pull request #820 from Atlante45/master
Display leap hand and rave glove in first person mode
This commit is contained in:
commit
9f5f7d96da
2 changed files with 17 additions and 12 deletions
|
@ -3110,7 +3110,6 @@ void Application::displaySide(Camera& whichCamera) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render my own Avatar
|
// Render my own Avatar
|
||||||
if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON) {
|
|
||||||
if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {
|
if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {
|
||||||
_myAvatar.getHead().setLookAtPosition(_myCamera.getPosition());
|
_myAvatar.getHead().setLookAtPosition(_myCamera.getPosition());
|
||||||
}
|
}
|
||||||
|
@ -3121,7 +3120,6 @@ void Application::displaySide(Camera& whichCamera) {
|
||||||
renderLookatIndicator(_lookatOtherPosition, whichCamera);
|
renderLookatIndicator(_lookatOtherPosition, whichCamera);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
_myAvatar.renderScreenTint(SCREEN_TINT_AFTER_AVATARS, whichCamera);
|
_myAvatar.renderScreenTint(SCREEN_TINT_AFTER_AVATARS, whichCamera);
|
||||||
|
|
||||||
|
|
|
@ -636,8 +636,13 @@ void Avatar::simulate(float deltaTime, Transmitter* transmitter, float gyroCamer
|
||||||
|
|
||||||
if (_isCollisionsOn) {
|
if (_isCollisionsOn) {
|
||||||
Camera* myCamera = Application::getInstance()->getCamera();
|
Camera* myCamera = Application::getInstance()->getCamera();
|
||||||
|
|
||||||
|
if (myCamera->getMode() == CAMERA_MODE_FIRST_PERSON) {
|
||||||
_collisionRadius = myCamera->getAspectRatio() * (myCamera->getNearClip() / cos(myCamera->getFieldOfView() / 2.f));
|
_collisionRadius = myCamera->getAspectRatio() * (myCamera->getNearClip() / cos(myCamera->getFieldOfView() / 2.f));
|
||||||
_collisionRadius *= COLLISION_RADIUS_SCALAR;
|
_collisionRadius *= COLLISION_RADIUS_SCALAR;
|
||||||
|
} else {
|
||||||
|
_collisionRadius = _height * .125f;
|
||||||
|
}
|
||||||
|
|
||||||
updateCollisionWithEnvironment(deltaTime);
|
updateCollisionWithEnvironment(deltaTime);
|
||||||
updateCollisionWithVoxels(deltaTime);
|
updateCollisionWithVoxels(deltaTime);
|
||||||
|
@ -1428,7 +1433,9 @@ float Avatar::getBallRenderAlpha(int ball, bool lookingInMirror) const {
|
||||||
|
|
||||||
void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
||||||
|
|
||||||
if (_head.getFace().isFullFrame()) {
|
if (Application::getInstance()->getCamera()->getMode() == CAMERA_MODE_FIRST_PERSON) {
|
||||||
|
// Dont display body
|
||||||
|
} else if (_head.getFace().isFullFrame()) {
|
||||||
// Render the full-frame video
|
// Render the full-frame video
|
||||||
float alpha = getBallRenderAlpha(BODY_BALL_HEAD_BASE, lookingInMirror);
|
float alpha = getBallRenderAlpha(BODY_BALL_HEAD_BASE, lookingInMirror);
|
||||||
if (alpha > 0.0f) {
|
if (alpha > 0.0f) {
|
||||||
|
|
Loading…
Reference in a new issue