UFO:Alien Invasion

Development => Coding => Topic started by: arisian on April 16, 2010, 05:11:06 pm

Title: mouse control of battlescape camera rotation
Post by: arisian 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.).
Title: Re: mouse control of battlescape camera rotation
Post by: Kildor 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..
Title: Re: mouse control of battlescape camera rotation
Post by: DiDiT 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...  ._.
Title: Re: mouse control of battlescape camera rotation
Post by: Mattn 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)
Title: Re: mouse control of battlescape camera rotation
Post by: Legendman3 on April 16, 2010, 10:51:31 pm
I dont have a mouse is that problem?
Title: Re: mouse control of battlescape camera rotation
Post by: arisian 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?
Title: Re: mouse control of battlescape camera rotation
Post by: Legendman3 on April 16, 2010, 11:02:56 pm
I have a laptop.  ;D I trick you!
Title: Re: mouse control of battlescape camera rotation
Post by: arisian on April 16, 2010, 11:05:42 pm
.....right.  Anyway.  Anyone with actual feedback?
Title: Re: mouse control of battlescape camera rotation
Post by: BTAxis on April 16, 2010, 11:29:18 pm
How about a keyboard shortcut for those without a middle mouse button?
Title: Re: mouse control of battlescape camera rotation
Post by: arisian 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...
Title: Re: mouse control of battlescape camera rotation
Post by: BTAxis on April 17, 2010, 12:25:50 am
ALT would be quite suitable.
Title: Re: mouse control of battlescape camera rotation
Post by: MCR 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  ::)  :-\
Title: Re: mouse control of battlescape camera rotation
Post by: MCR 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...
Title: Re: mouse control of battlescape camera rotation
Post by: BTAxis 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.
Title: Re: mouse control of battlescape camera rotation
Post by: MCR on April 19, 2010, 10:32:36 am
Just a idea for 2.4+  ;)
Title: Re: mouse control of battlescape camera rotation
Post by: MCR on April 14, 2012, 10:52:40 am
The battlescape camera is fully operational now.
Previously the cursor needed to hover over walkable terrain for the initiation of the camera control. This check has been removed and from now on you can control the battlescape camera via middle mousebutton, no matter where the cursor is (except over menus). This fix is in master, but has been merged back to v2.4 as well.