mattrdowney / planetaria

A Unity framework for Euclidean 2-sphere games (e.g. 2D virtual reality games) [quasi-MIT license]
Other
10 stars 2 forks source link

PlanetariaInput #48

Open mattrdowney opened 6 years ago

mattrdowney commented 6 years ago

using the Command pattern.

In depth explanation:

PlanetariaInput.cursor (an optional). PlanetariaInput.buffered_action = holds the last (unable to activate) button pressed (with timeout duration) and the raw analog direction(s) / camera-relative analog direction(s). PlanetariaInput.get_dual_axis(int index) // single axis is seldom useful because movement is often camera-relative, also this allows for flipping horizontal/vertical axes PlanetariaInput.get_command()

Remappable input at runtime.

[Rough draft, subject to a lot of change.]

mattrdowney commented 6 years ago

There are similar packages in the Unity Asset Store, but this is supposed to be free/MIT-licenced (without attribution clauses).