mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 03:52:45 +02:00
Merge pull request #6139 from samcake/controllers
Controllers : Fixing the pose transmission
This commit is contained in:
commit
0aab108729
2 changed files with 4 additions and 1 deletions
|
@ -12,7 +12,7 @@ namespace controller {
|
|||
|
||||
Pose::Pose(const vec3& translation, const quat& rotation,
|
||||
const vec3& velocity, const quat& angularVelocity) :
|
||||
translation(translation), rotation(rotation), velocity(velocity), angularVelocity(angularVelocity) { }
|
||||
translation(translation), rotation(rotation), velocity(velocity), angularVelocity(angularVelocity), valid (true) { }
|
||||
|
||||
bool Pose::operator==(const Pose& right) const {
|
||||
// invalid poses return false for comparison, even against identical invalid poses, like NaN
|
||||
|
|
|
@ -205,6 +205,9 @@ public:
|
|||
virtual Pose pose() override { return _currentPose; }
|
||||
virtual void apply(const Pose& newValue, const Pose& oldValue, const Pointer& source) override {
|
||||
_currentPose = newValue;
|
||||
if (!_currentPose.isValid()) {
|
||||
return;
|
||||
}
|
||||
if (!(_input == Input::INVALID_INPUT)) {
|
||||
auto userInputMapper = DependencyManager::get<UserInputMapper>();
|
||||
userInputMapper->setActionState(Action(_input.getChannel()), _currentPose);
|
||||
|
|
Loading…
Reference in a new issue