Character.h
const int CTRL_FORWARD = 1;
const int CTRL_BACK = 2;
const int CTRL_LEFT = 4;
const int CTRL_RIGHT = 8;
const int CTRL_JUMP = 16;
Character.cpp
if (controls_.IsDown(CTRL_FORWARD))
moveDir += Vector3::FORWARD;
if (controls_.IsDown(CTRL_BACK))
moveDir += Vector3::BACK;
if (controls_.IsDown(CTRL_LEFT))
moveDir += Vector3::LEFT;
if (controls_.IsDown(CTRL_RIGHT))
moveDir += Vector3::RIGHT;
I know im a noob but i cant find a correlation between those numbers (1,2,4,8,16) and the keys that i am pressing…
Also why does the character in the demo move right when i press F1?
Could someone ELI5 this to me?