Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Tutorials
#1

8-way directional movement from analog stick and d-pad

Archive: 3 posts


This circuit takes input from the d-pad and one of the analogue sticks on a controlinator, converting them to 8 unique digital signals that you can then hook up to movers or whatever you want.

Whether you're making a retro shooter with authentic 8-way controls but want to use the analogue stick, or you're making an isometric game and found an advanced mover hooked up to the d-pad doesn't produce a shallow enough angle of travel when you try to move diagonally, then this circuit may help.

http://i0.lbp.me/img/ft/f0087cd29cba7d0905d63eec4219b0eb0b33ab33.png

The two XOR gates take input from the analogue stick and d-pad. The top XOR gate takes the up/down output of both the d-pad and an analogue stick. The lower XOR gate takes the left/right output of both the d-pad and an analogue stick.

If you wanted to use this with just an analogue stick or just the d-pad alone, if it's not already obvious, you could take out the XOR gates and wire instead to the direction splitters.

The sequencers determine the deadzone of the analogue stick as well as getting rid of any analogue component in the signal. They're set to positional and contain a single battery covering a range of around 25% to 100%. All the sequencers are the same.

Issues I had:
placing a battery across the entire width of the sequencer to negate the deadzone from the analogue stick results in choppy resultant output
the XOR gates only prevent the player using both the analogue stick and d-pad being used in unison across the same axis, they could still potentially use the analogue stick and d-pad independently across opposing axes
2011-09-22 16:14:00

Author:
Ayneh
Posts: 2454


i made a similar one using only digital signals a while back, it works fine but with the way analog sticks do digital it may not b as accurate as yours. the selector is only there to bring analog up to 100%, and i also had the NOT inverted at one point to make it remember last direction
http://i8.lbp.me/img/ft/8c87b5247463d3006a97c8ee05bb49e2367517d4.jpg
2011-09-22 16:59:00

Author:
evret
Posts: 612


i made a similar one using only digital signals a while back, it works fine but with the way analog sticks do digital it may not b as accurate as yours. the selector is only there to bring analog up to 100%, and i also had the NOT inverted at one point to make it remember last direction

http://i8.lbp.me/img/ft/8c87b5247463d3006a97c8ee05bb49e2367517d4.jpg
Nice. I built your circuit I tried them out side by side. With the d-pad there's no difference but with the analogue stick there was some difference in when either circuit would detect a diagonal input, I put this difference down to the use of sequencers in my circuit.

After removing the sequencers from my circuit they both operated identically, so yours is the superior design since it uses 4 less components.
2011-09-23 12:36:00

Author:
Ayneh
Posts: 2454


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.