project-navigation
Personal tools

Author Topic: mouse control of battlescape camera rotation  (Read 9509 times)

Offline arisian

  • Rookie
  • ***
  • Posts: 91
    • View Profile
mouse control of battlescape camera rotation
« on: April 16, 2010, 05:11:06 pm »
I've implemented a quick-and-dirty version of mouse-based camera control for the battlescape.  If you hold down the middle mouse button and drag, it will control camera pan/tilt (in the way common to many other 3D games).

I've attached the patch, but I'm not sure the patch should go into the trunk in its current form; right now, there's no way to turn the feature on/off, control the speed of rotation, re-bind the control, etc. except to change the source code.  It may also be brittle; I haven't tested it extensively, and I don't know if it will introduce any undesirable interactions with existing code.  If people want to play with the patch and give me feedback, though, that would be great.  In particular, thoughts about how this feature should actually behave, and how (or if) the user should be able to control it from the in-game options menus (ie. speed, binding, etc.).

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
Re: mouse control of battlescape camera rotation
« Reply #1 on: April 16, 2010, 05:29:19 pm »
Very nice, I know some ppls who request this feature.. I'll test it on the weekend and write my opinion..

Offline DiDiT

  • Squad Leader
  • ****
  • Posts: 149
  • Your local Flame-thrower wielding Furry.
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #2 on: April 16, 2010, 06:33:25 pm »
Awesome! been waiting on something like this...


except I don't have middle mouse button on my mouse any more...  ._.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: mouse control of battlescape camera rotation
« Reply #3 on: April 16, 2010, 07:16:29 pm »
i like it - though i don't think the cursor should be visible while moving the camera - it should maybe show a different cursor (see the cursor cvar) while dragging the camera like that (that is only rendered in the centre of the screen)

Offline Legendman3

  • Sergeant
  • *****
  • Posts: 306
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #4 on: April 16, 2010, 10:51:31 pm »
I dont have a mouse is that problem?

Offline arisian

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #5 on: April 16, 2010, 11:02:05 pm »
All the old keyboard-based camera controls are still there; this just adds an extra way of controling the camera pan/tilt in a way that's a bit more natural relative to other 3D games.  You don't *need* to use this feature, though how are you playing the game at all without a mouse?

Offline Legendman3

  • Sergeant
  • *****
  • Posts: 306
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #6 on: April 16, 2010, 11:02:56 pm »
I have a laptop.  ;D I trick you!

Offline arisian

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #7 on: April 16, 2010, 11:05:42 pm »
.....right.  Anyway.  Anyone with actual feedback?

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #8 on: April 16, 2010, 11:29:18 pm »
How about a keyboard shortcut for those without a middle mouse button?

Offline arisian

  • Rookie
  • ***
  • Posts: 91
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #9 on: April 16, 2010, 11:52:57 pm »
A good idea; I'll try to make it a standard "bindable" keysym.  Any thoughts on the default?  CTRL and SHIFT are in use, but ALT isn't bound in the default config, so far as I know...

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #10 on: April 17, 2010, 12:25:50 am »
ALT would be quite suitable.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #11 on: April 19, 2010, 01:52:31 am »
I like every feature which uses the possibilities of 3d to enhance gameplay & I think this one is working very nice (especially with set cl_campitchmin 0)  ;)
I would have some additional ideas regarding the camera to further improve gameplay & increase immersion into the game for the player:

It would be nice to have different 'killcams', that when an alien or human soldier dies (not often) an additional camera animation is played & the final hit is shown in slow motion...
To make this effect look 'new & fresh' each time there could be different sets of camera movement paths  pre-programmed & chosen by choice, so this effect would look cool each time...
This would add to the gameplay big time although I do not know if this could be implemented easily  ::)  :-\

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #12 on: April 19, 2010, 07:17:49 am »
This killcam-slomo would not have to be displayed in FullScreen, but there could be a small window opened each time somebody is killed where a live-slow-motion version of the action is displayed...

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #13 on: April 19, 2010, 10:24:54 am »
Not sure about that, it seems a lot of work for not too much gain. In fact, with the level of graphical quality it's probably best not to do it at all.

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: mouse control of battlescape camera rotation
« Reply #14 on: April 19, 2010, 10:32:36 am »
Just a idea for 2.4+  ;)