Hybrid Overhead Camera (v4) - Page 3

Hybrid Overhead Camera (v4)

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Gedanken
Posts: 121
Joined: 13 Oct 2008, 02:57

Re: Hybrid Overhead Camera (v4)

Post by Gedanken »

Regret wrote:Ask BrainDamage, he modified his version to do exactly that afaik.
Is it possible to disable the meta in the widget so that when you "push middle mouse button" it would in fact be the only time the hybrid camera is used?
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Hybrid Overhead Camera (v4)

Post by Saktoth »

Regret wrote: I kinda like being able to see everything.
You mean being able to see through the terrain? Well, not only does it look screwy, but its sort of useless: You cant issue orders from down there.

I sometimes switch to FPS camera to look around at the skybox or watch an incoming nuke. It would be nice to be able to do that without the camera going underground.

Anyway still a huge improvement, the camera is really great. Ill talk to braindamage.

Another bug though: If you click the mouse wheel then scroll it and release at the same time ('flick' it), the camera will sometimes spin wildly and continuously until you press MMB again. This is much easier to replicate if 'center_cursor_on_J_movement = false' since it only happens when the mouse isnt in the centre of the screen, but it still happens sometimes in any case.

Is there any way to unbind middle mouse button from the crosshair thing entirely? That'd some the problem. Cant find it in uikeys.

One more:
Spin the camera 180 around the y axis (so 'north' is 'south' and the sea on DSD would be at the top of the screen). Zoom right out. Now move the mouse around until you get the tooltip that tells you the elevation etc. Its where you would expect it to be if the camera were oriented normally. Worse, this is the area thats registered and land you can zoom in on: you can go waaaaaaaay off the map by zooming into this area. A minor nuisance but weird anyway.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Hybrid Overhead Camera (v4)

Post by Regret »

Saktoth wrote:Another bug though: If you click the mouse wheel then scroll it and release at the same time ('flick' it), the camera will sometimes spin wildly and continuously until you press MMB again. This is much easier to replicate if 'center_cursor_on_J_movement = false' since it only happens when the mouse isnt in the centre of the screen, but it still happens sometimes in any case.

Is there any way to unbind middle mouse button from the crosshair thing entirely? That'd some the problem. Cant find it in uikeys.
Spring bug. Whine to devs about it, I already reported it.
Saktoth wrote:Spin the camera 180 around the y axis (so 'north' is 'south' and the sea on DSD would be at the top of the screen). Zoom right out. Now move the mouse around until you get the tooltip that tells you the elevation etc. Its where you would expect it to be if the camera were oriented normally. Worse, this is the area thats registered and land you can zoom in on: you can go waaaaaaaay off the map by zooming into this area. A minor nuisance but weird anyway.
Are you using smooth scroll widget by any chance?
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Hybrid Overhead Camera (v4)

Post by luckywaldo7 »

Saktoth wrote:
Regret wrote: I kinda like being able to see everything.
You mean being able to see through the terrain? Well, not only does it look screwy, but its sort of useless: You cant issue orders from down there.
It also allows for com upskirt shots.

Image
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Hybrid Overhead Camera (v4)

Post by Saktoth »

Are you using smooth scroll widget by any chance?
Nope. It seems to be caused by the relocation of the mouse which happens when you get the crosshair, and the widget taking this as mouse movement and flipping out.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Hybrid Overhead Camera (v4)

Post by Satirik »

something is wrong with the zoom, the thing's position in the screen you're pointing change when zooming

and is there a way to reset the view ? (maybe it could snap to the default view when around the default values)

edit: btw this camera mode is pretty good and intuitive
mongus
Posts: 1463
Joined: 15 Apr 2005, 18:52

Re: Hybrid Overhead Camera (v4)

Post by mongus »

I edited this part to enable the TAB key as the pan toggle.

Code: Select all

function widget:KeyPress(key,isRepeat)
	if (track) then
		if (key == 27) then --ESC
			track = false
			return true
		end
	end
	
	if (key == 273) then --uparrow
		edgemoveup = true
	elseif (key == 274) then --downarrow
		edgemovedown = true
	elseif (key == 275) then --rightarrow
		edgemoveright = true
	elseif (key == 276) then --leftarrow
		edgemoveleft = true
	elseif (key == 9) then --TAB
		track = true
	end
end

function widget:KeyRelease(key)
	if (key == 273) then --uparrow
		edgemoveup = nil
	elseif (key == 274) then --downarrow
		edgemovedown = nil
	elseif (key == 275) then --rightarrow
		edgemoveright = nil
	elseif (key == 276) then --leftarrow
		edgemoveleft = nil
	end
	if (key == 9) then --TAB
		track = false
	end
end
Remember to
//bind Any+tab toggleoverview
or
unbind Any+tab toggleoverview

Its delicious.

Edit: using tab has the advantage pan does not "stick" like it does with mmb (spring bug).
Last edited by mongus on 18 Nov 2009, 17:37, edited 1 time in total.
Gedanken
Posts: 121
Joined: 13 Oct 2008, 02:57

Re: Hybrid Overhead Camera (v4)

Post by Gedanken »

:O Nice!
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Hybrid Overhead Camera (v4)

Post by CarRepairer »

Saktoth wrote:Its a shame that space has to be used to tilt the camera though. What are the other options?
I modified it to use ctrl+middle-drag. That way I can still use middle-drag for smoothscroll and spacebar is free.

Still waiting for Regret to fix the zoom.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Hybrid Overhead Camera (v4)

Post by Regret »

CarRepairer wrote:Still waiting for Regret to fix the zoom.
Image
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Hybrid Overhead Camera (v4)

Post by Saktoth »

CarRepairer wrote:
Saktoth wrote:Its a shame that space has to be used to tilt the camera though. What are the other options?
I modified it to use ctrl+middle-drag. That way I can still use middle-drag for smoothscroll and spacebar is free.

Still waiting for Regret to fix the zoom.
Does your modification still have the issues with middle drag stated above?
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Hybrid Overhead Camera (v4)

Post by Satirik »

did you fix the zoom and add a way to reset the view ?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Hybrid Overhead Camera (v4)

Post by Regret »

Satirik wrote:did you fix the zoom and add a way to reset the view ?
Ah the beauty of imperfection. :regret:
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Hybrid Overhead Camera (v4)

Post by BrainDamage »

this is my own version, cba to write changelog, cba to fix further stuff, i've did all the changes for myself, but it also does some of the stuff that people requested here :regret:
Attachments
camera_hybridoverhead.lua
(12.89 KiB) Downloaded 169 times
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Hybrid Overhead Camera (v4)

Post by Caydr »

I tried out the vanilla version and Brain Damage's version, both have their strengths and weaknesses. BD's doesn't screw up along map edges (this may be associated with large terrain differences) but also behaves oddly with its zoom-to-cursor setting.

I'm in the process of making a bastard child halfbreed of these two, with some of my own changes, but I came across something I'm not sure how to fix. Certain things seem to get past the input filter that your widget uses... like... for example if I scroll the mouse wheel while also pushing down on it, the control somewhat reverts to the standard behavior. This can be fixed by pushing the middle mouse button usually.

Either of you guys know a permanent way of fixing this? It happens on both of your most recent versions without any of my modifications, it's not something I've done wrong. I'm reasonably certain it's not a widget conflict since only a handful of the ones I use have any effect beyond GUI enhancements.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Hybrid Overhead Camera (v4)

Post by Regret »

Caydr wrote:for example if I scroll the mouse wheel while also pushing down on it, the control somewhat reverts to the standard behavior. This can be fixed by pushing the middle mouse button usually.
Spring engine bug.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: Hybrid Overhead Camera (v4)

Post by Caydr »

No workaround possible?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Hybrid Overhead Camera (v4)

Post by Regret »

Caydr wrote:No workaround possible?
If I knew about one then you wouldn't encounter it in the first place.
Post Reply

Return to “Lua Scripts”