mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 12:42:58 +02:00
Fix warnings and update controls
This commit is contained in:
parent
63c2b41929
commit
33ea63c708
3 changed files with 33 additions and 4 deletions
|
@ -78,6 +78,15 @@
|
||||||
"to": "Actions.Yaw"
|
"to": "Actions.Yaw"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ "from": { "makeAxis" : [
|
||||||
|
["Keyboard.Left"],
|
||||||
|
["Keyboard.Right"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"when": ["Application.CameraFirstPersonLookat", "!Keyboard.Shift"],
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
|
||||||
{ "from": { "makeAxis" : [
|
{ "from": { "makeAxis" : [
|
||||||
["Keyboard.Left"],
|
["Keyboard.Left"],
|
||||||
["Keyboard.Right"]
|
["Keyboard.Right"]
|
||||||
|
@ -113,7 +122,16 @@
|
||||||
"when": ["Application.CameraFirstPerson", "!Keyboard.Control"],
|
"when": ["Application.CameraFirstPerson", "!Keyboard.Control"],
|
||||||
"to": "Actions.Yaw"
|
"to": "Actions.Yaw"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ "from": { "makeAxis" : [
|
||||||
|
["Keyboard.A"],
|
||||||
|
["Keyboard.D"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"when": ["Application.CameraFirstPersonLookat", "!Keyboard.Control"],
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
|
||||||
{ "from": { "makeAxis" : [
|
{ "from": { "makeAxis" : [
|
||||||
["Keyboard.A"],
|
["Keyboard.A"],
|
||||||
["Keyboard.D"]
|
["Keyboard.D"]
|
||||||
|
@ -149,6 +167,15 @@
|
||||||
"when": "Application.CameraFirstPerson",
|
"when": "Application.CameraFirstPerson",
|
||||||
"to": "Actions.Yaw"
|
"to": "Actions.Yaw"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ "from": { "makeAxis" : [
|
||||||
|
["Keyboard.TouchpadLeft"],
|
||||||
|
["Keyboard.TouchpadRight"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"when": "Application.CameraFirstPersonLookat",
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
|
||||||
{ "from": { "makeAxis" : [
|
{ "from": { "makeAxis" : [
|
||||||
["Keyboard.TouchpadLeft"],
|
["Keyboard.TouchpadLeft"],
|
||||||
|
@ -222,10 +249,12 @@
|
||||||
{ "from": "Keyboard.Left", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" },
|
{ "from": "Keyboard.Left", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" },
|
||||||
{ "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" },
|
{ "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" },
|
||||||
{ "from": "Keyboard.Up", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
|
{ "from": "Keyboard.Up", "when": "Application.CameraFirstPersonLookat", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
{ "from": "Keyboard.Up", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
{ "from": "Keyboard.Up", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
{ "from": "Keyboard.Up", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
{ "from": "Keyboard.Down", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
|
{ "from": "Keyboard.Down", "when": "Application.CameraFirstPersonLookat", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
{ "from": "Keyboard.Down", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
{ "from": "Keyboard.Down", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
{ "from": "Keyboard.Down", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
|
|
|
@ -717,7 +717,7 @@ private:
|
||||||
|
|
||||||
static const QString STATE_IN_HMD = "InHMD";
|
static const QString STATE_IN_HMD = "InHMD";
|
||||||
static const QString STATE_CAMERA_FULL_SCREEN_MIRROR = "CameraFSM";
|
static const QString STATE_CAMERA_FULL_SCREEN_MIRROR = "CameraFSM";
|
||||||
static const QString STATE_CAMERA_FIRST_PERSON = "CameraFirstPersonLegacy";
|
static const QString STATE_CAMERA_FIRST_PERSON = "CameraFirstPerson";
|
||||||
static const QString STATE_CAMERA_FIRST_PERSON_LOOK_AT = "CameraFirstPersonLookat";
|
static const QString STATE_CAMERA_FIRST_PERSON_LOOK_AT = "CameraFirstPersonLookat";
|
||||||
static const QString STATE_CAMERA_THIRD_PERSON = "CameraThirdPerson";
|
static const QString STATE_CAMERA_THIRD_PERSON = "CameraThirdPerson";
|
||||||
static const QString STATE_CAMERA_ENTITY = "CameraEntity";
|
static const QString STATE_CAMERA_ENTITY = "CameraEntity";
|
||||||
|
|
|
@ -854,8 +854,8 @@ void Avatar::render(RenderArgs* renderArgs) {
|
||||||
float distanceToTarget = glm::length(toTarget);
|
float distanceToTarget = glm::length(toTarget);
|
||||||
const float DISPLAYNAME_DISTANCE = 20.0f;
|
const float DISPLAYNAME_DISTANCE = 20.0f;
|
||||||
updateDisplayNameAlpha(distanceToTarget < DISPLAYNAME_DISTANCE);
|
updateDisplayNameAlpha(distanceToTarget < DISPLAYNAME_DISTANCE);
|
||||||
if (!isMyAvatar() || renderArgs->_cameraMode != (int8_t)CAMERA_MODE_FIRST_PERSON_LOOK_AT
|
if (!isMyAvatar() || !(renderArgs->_cameraMode == (int8_t)CAMERA_MODE_FIRST_PERSON_LOOK_AT
|
||||||
|| renderArgs->_cameraMode != (int8_t)CAMERA_MODE_FIRST_PERSON) {
|
|| renderArgs->_cameraMode == (int8_t)CAMERA_MODE_FIRST_PERSON)) {
|
||||||
auto& frustum = renderArgs->getViewFrustum();
|
auto& frustum = renderArgs->getViewFrustum();
|
||||||
auto textPosition = getDisplayNamePosition();
|
auto textPosition = getDisplayNamePosition();
|
||||||
if (frustum.pointIntersectsFrustum(textPosition)) {
|
if (frustum.pointIntersectsFrustum(textPosition)) {
|
||||||
|
|
Loading…
Reference in a new issue