Last active
December 21, 2015 05:39
-
-
Save febret/6258665 to your computer and use it in GitHub Desktop.
GamepadCameraController camera update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////////////////////////// | |
void GamepadCameraController::update(const UpdateContext& context) | |
{ | |
if(!isEnabled()) return; | |
Camera* c = getCamera(); | |
c->setOrientation(Math::quaternionFromEuler(Vector3f(myPitch, myYaw, 0))); | |
c->translate(mySpeedVector * context.dt, Node::TransformLocal); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment