Jump to content

Key bindings and reverse axis.


RogueBot
 Share

Recommended Posts

Hey all,

 

I'm not having any luck searching for these questions so I'd thought I ask the forum instead.

For the FPS Controller, is there a way (sample somewhere perhaps) to let the user define key bindings and to reverse the Y axis of the mouse?

 

I'm one of those people that cannot look up/down without reversing the Y axis! smile.png

 

And I also frequently remap wasd to asdf (a=strafe right, s=strafe left, d=down, f=up) hehe

Link to comment
Share on other sites

See the script attached. You have an extra option on the script that allows you to toggle Y inverting. I have also replaced the key bindings to ASDF. (I must say that I have never ever heard someone use those key bindings before :))

FPSPlayer-InvertY-asdf.lua

 

post-45-0-70433500-1389806338.jpg

 

If the keybinding is not correct you can also change it yourself quite easily. Look for these lines

 

if window:KeyDown(Key.f) then self.input[1]=self.input[1]+1 end
if window:KeyDown(Key.d) then self.input[1]=self.input[1]-1 end
if window:KeyDown(Key.a) then self.input[0]=self.input[0]+1 end
if window:KeyDown(Key.s) then self.input[0]=self.input[0]-1 end

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...