mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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"]
|
||||
]
|
||||
},
|
||||
|
||||
"when": [ "Application.InHMD", "Application.ComfortMode" ],
|
||||
"to": "Actions.StepYaw",
|
||||
"filters":
|
||||
|
@ -29,10 +28,18 @@
|
|||
]
|
||||
},
|
||||
|
||||
{ "from": ["Keyboard.A", "Keyboard.Left", "Keyboard.TouchpadLeft"], "to": "Actions.YAW_LEFT" },
|
||||
{ "from": ["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"], "to": "Actions.YAW_RIGHT" },
|
||||
{ "from": "Keyboard.MouseMoveLeft", "when": "Keyboard.RightMouseClick", "to": "Actions.YAW_LEFT" },
|
||||
{ "from": "Keyboard.MouseMoveRight", "when": "Keyboard.RightMouseClick", "to": "Actions.YAW_RIGHT" },
|
||||
{ "from": { "makeAxis" : [
|
||||
["Keyboard.A", "Keyboard.Left", "Keyboard.TouchpadLeft"],
|
||||
["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"]
|
||||
]
|
||||
},
|
||||
"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.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 result = first->value() * -1.0f + second->value();
|
||||
return result;
|
||||
|
|
|
@ -19,6 +19,8 @@ namespace controller {
|
|||
|
||||
virtual float value() override;
|
||||
virtual void apply(float newValue, const Pointer& source) override;
|
||||
virtual bool readable() const override;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue