Dynamic D-pad [Unity package]

You can download the latest version here:
http://www.diorgo.com/v1/downloads/DynamicDpad_v101.zip

Dynamic D-pad is a simple, responsive d-pad for Unity games that use touch controls. Add the DynamicDpad component to a game object then read the axes values. It is as easy as that. There are properties exposed for tweaking, but the default values should work fine for most games. It automatically handles multiple screen resolutions and supports more than one d-pad at a time (e.g. dual stick controls).



Updates:
Version 1.0.1:
- Support for Unity 2D’s GUITexture. There are 2 new methods to position the d-pad and the d-pad’s knob (“PositionGUITexture” and “PositionKnobGUITexture”).
- The example Unity 2D project to show how the new methods work. Have a look at “PlayerControl.cs”.



I used a very similar d-pad in the following 2 games:
Bounty Arms
http://gamewoof.com/game-reviews/bounty-arms-platforming-that-couldve-been-on-console-but-its-tablet-riffic/
https://itunes.apple.com/ca/app/bounty-arms/id592322930?mt=8

Pure Fun Soccer
https://itunes.apple.com/us/app/pure-fun-soccer-lite/id533048090?mt=8

Manual:
Here’s a link to the manual:
http://www.diorgo.com/v1/downloads/DynamicDpad_Manual_v100.pdf

Please note: The “DynamicDpad” class does not render the d-pad. You will have to use whatever GUI system you are using to render the d-pad. There is an example script “ExampleDpadRendering” that shows how to get the d-pad’s coordinates for rendering.

How to run the demo scenes:
Add all the demo scenes to the build settings. Make sure the scene “Demo Menu” is the first in the list, if you want to build to a device. Open and play the scene “Demo Menu” if you want to test it in the editor. You will then be able to select scenes from the menu. You can return to the menu by clicking the “Menu” button at the top of the screen.


Dynamic D-pad

Dynamic D-pad

Dynamic D-pad

Dynamic D-pad

Dynamic D-pad

9 Responses to “Dynamic D-pad [Unity package]”

  1. lzn says:

    Thank you for this great package. How can i do character acceleration and deceleration with dynamic dpad script.

  2. lzn says:

    sorry i forgot to say. i am using character controller. i have to do deceleration and acceleration with controller.move

    • Diorgo says:

      Thanks for the compliment.
      There’s more than one way to do acceleration/deceleration.

      First get the character moving:
      Have a look at “SideScrollerController.cs” in the folder “Assets\Demo Scenes\Resources For Demos\Scripts\”.

      Based on that example:
      You can increase/decrease “movementSpeed” over time to create the affect of acceleration/deceleration.

      Please email me if you need more info.

  3. Tez 82 says:

    Hi, Would this package work easily in a 2D project? I noticed that the movement scripts all use vector 3 movement, and would need vector 2 for the 2D stuff.

  4. KAIM says:

    I can use the script with mecanim system?

    • Diorgo says:

      I depends what you want to do with the mecanim system.
      The d-pad gives you axis values which are used to move the player around, similar to a joystick.

  5. Brandon says:

    How do we deal with deadzones in this script? My characters keep snapping to 45 degree angles. You have to be DEAD ON at 90 degrees or 0 degrees to get the character to run up, down, left, right.

    I’m pretty nooby so sorry if it’s something simple :/

    • Diorgo says:

      Hi

      Try changing and testing the following one at a time (they are on the “Dynamic Dpad” component):
      Use Precision
      Use AbsoluteValues
      Use AxesBias

Leave a Reply

LouiseBrooks theme byThemocracy