Feral Heart

Game & Forum Discussion => Game Discussion => Game Suggestions & Ideas => Topic started by: kinfuyuki789 on April 24, 2024, 05:38:54 am

Title: mouse capture so we wont have to hold right click all time
Post by: kinfuyuki789 on April 24, 2024, 05:38:54 am
it is just a cool feature suggestion to add some immersion, to add a hotkey it is easy, i saw this game was made probably in c++ since is made in ogre and have irrlicht sound lib

so do something like this:


switch (input){
 case key_mouselock:
  mouselocked=!mouselocked;
  lookaround=mouselocked;
  mouse.x=200;
  mouse.y=200;
  break;
 case mouse_move:
  if (!mouselocked) movepointer();
  break;
 case rightmouse:
  if (!mouselocked) lookaround=!lookaround;
  break;
}

(it took a while to color everything but it looks great at least)

as you can see i made like... all input things i said being handled here so its easier to understand what i mean ^^