Loading...
  OR  Zero-K Name:    Password:   

Camera control.

6 posts, 599 views
Post comment
Filter:    Player:  
sort
8 years ago
I want to use a flightstick to operate the camera but i don't see any way to rebind camera controls. Is there a way to add this in the config files or is it jus unimplemented?
+0 / -0
8 years ago
From look at engine Lua functions are supposed to be
JoyAxis(axis, value)
JoyHat(hat, value)
JoyButtonDown/Up(button, state)

-> None of them are found in zeroK -> Not implemented.

Btw: Once the functions had worked but now when I made testwidget ala
function widget:JoyButtonDown(button, state)
Spring.Echo("button:",button, state)
end

nothing happend.
The only thing that I worked for me were "Joystick connected/disconnected" messages from
function widget:JoystickEvent(a,b,c)
Spring.Echo (a)
Spring.Echo (b)
Spring.Echo (c)
end

when (dis)connecting devices.
+0 / -0


8 years ago
We have not put any work into rebinding camera controls within the Zero-K settings interface. I do not know whether Spring has inbuilt camare control rebinding. It is definitely possible to write a widget to make the camera respond to any keys. I do not know whether widgets can see joystick controls.

USrankRebel0 can you try binding a hotkey to a joystick tilt through the ingame menu? It would be interesting to see whether this is already supported. If this is supported then all we need to do is allow for rebinding camera controls.
+0 / -0
8 years ago
Why would the KeyPress() function of the ingame menu react to joystick button or axis changes?
+0 / -0

8 years ago
As a workaround you can always use something like xpadder(Maps joystick to keyboard presses). But ofc native joystick support would be the real deal.
+0 / -0
Hey, i'm back with a update.

Xpadder works pretty well with this joystick and i think this can work. I'm thinking of binding in something like incrimental camera control at some point. I cant think of a way outside a solid day of learning scripthooks and code practice, but if there's some function like a keyboard key you can hold to scroll slowly I can macro towards it. I'm also working on camera rotation, and testing to see if i can bind VIA the ingame menus soon.
+0 / -0