Skip to content

Commit

Permalink
ENGINES: Add satellite camera movement with controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed Dec 29, 2018
1 parent 77391fa commit fd57402
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/engines/aurora/satellitecamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ bool SatelliteCamera::handleCameraInput(const Events::Event &e) {
}
break;

case Events::kEventControllerAxisMotion:
switch (e.caxis.axis) {
case Events::kControllerAxisLeftX:
case Events::kControllerAxisRightX:
_rightBtnPressed = e.caxis.value > 10000;
_leftBtnPressed = e.caxis.value < -10000;
return true;
}
break;

default:
break;
}
Expand Down

0 comments on commit fd57402

Please sign in to comment.