Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

flight.inputMap

Vertical movement for a player that flies or swims: flyUp and flyDown.

The map composes — activate it beside the standard scheme and the player gains two controls, release it and they lose exactly those two. Its group is player, so a vehicle or a menu that stands the player down stands these down too.

  • flyUp — E or Space, the right trigger, or a lower-right touch button.
  • flyDown — Q, Ctrl or Shift, the left trigger, or a lower-right touch button.

A controller that wants a single signed value reads both and subtracts:

local map = self.flightMap:activate()
map.flyUp:onInput(function(_, dt, active) self.up = active end)
map.flyDown:onInput(function(_, dt, active) self.down = active end)