mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:12:46 +02:00
make sure CompositeEndpoints properly report readability more axis based keyboard inputs
This commit is contained in:
parent
8a03383adc
commit
70f3156328
3 changed files with 18 additions and 5 deletions
|
@ -19,7 +19,6 @@
|
||||||
["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"]
|
["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"when": [ "Application.InHMD", "Application.ComfortMode" ],
|
"when": [ "Application.InHMD", "Application.ComfortMode" ],
|
||||||
"to": "Actions.StepYaw",
|
"to": "Actions.StepYaw",
|
||||||
"filters":
|
"filters":
|
||||||
|
@ -29,10 +28,18 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "from": ["Keyboard.A", "Keyboard.Left", "Keyboard.TouchpadLeft"], "to": "Actions.YAW_LEFT" },
|
{ "from": { "makeAxis" : [
|
||||||
{ "from": ["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"], "to": "Actions.YAW_RIGHT" },
|
["Keyboard.A", "Keyboard.Left", "Keyboard.TouchpadLeft"],
|
||||||
{ "from": "Keyboard.MouseMoveLeft", "when": "Keyboard.RightMouseClick", "to": "Actions.YAW_LEFT" },
|
["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"]
|
||||||
{ "from": "Keyboard.MouseMoveRight", "when": "Keyboard.RightMouseClick", "to": "Actions.YAW_RIGHT" },
|
]
|
||||||
|
},
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
|
||||||
|
{ "from": { "makeAxis" : ["Keyboard.MouseMoveLeft", "Keyboard.MouseMoveRight"] },
|
||||||
|
"when": "Keyboard.RightMouseClick",
|
||||||
|
"to": "Actions.Yaw",
|
||||||
|
},
|
||||||
|
|
||||||
{ "from": "Keyboard.A", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" },
|
{ "from": "Keyboard.A", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" },
|
||||||
{ "from": "Keyboard.D", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" },
|
{ "from": "Keyboard.D", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" },
|
||||||
|
|
|
@ -20,6 +20,10 @@ CompositeEndpoint::CompositeEndpoint(Endpoint::Pointer first, Endpoint::Pointer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CompositeEndpoint::readable() const {
|
||||||
|
return first->readable() && second->readable();
|
||||||
|
}
|
||||||
|
|
||||||
float CompositeEndpoint::value() {
|
float CompositeEndpoint::value() {
|
||||||
float result = first->value() * -1.0f + second->value();
|
float result = first->value() * -1.0f + second->value();
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -19,6 +19,8 @@ namespace controller {
|
||||||
|
|
||||||
virtual float value() override;
|
virtual float value() override;
|
||||||
virtual void apply(float newValue, const Pointer& source) override;
|
virtual void apply(float newValue, const Pointer& source) override;
|
||||||
|
virtual bool readable() const override;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue