Handling input


#1

This is the way to go for handling input? There is no pure Skookum way right? If so, might this be added at some point?


#2

This is how I’ve been doing it but I use input bindings instead of the raw events. It would be kind of cool if :sk: allowed equivalent behavior of overriding SetupInputComponent for both player controllers and pawns. Letting you bind a function to an axis or key event.


#3

MoveForward/MoveRight are axis mappings set in project settings. That what you meant by input bindings?


#4

You’re absolutely right! I mistook them for a raw event like Gamepad Left Analog X-Axis :confused:


#5

I tried making my own input controls in my custom pawn:
(function was called “handle_horizontal()” and looks like this:

&blueprint
(Real axis) 
  [
  // Your code here.
  @move_vec.@x = axis
  println("Move vec X: " axis)
  ]

Axis in project settings is called "Horizontal"
Does this have to be in the default pawn or something?


#6

It can be in any pawn - you currently just have to hook it up to a Blueprint as shown in the image above.


#7

Any way to do it without Blueprint with a custom pawn?


#8

Not currently - you need the Blueprint as glue.