Product Image

Highly versatile component for mobile development. It offers full customization to perfectly fit your needs, allowing you to adjust the size-to-knob ratio, joystick sprites, and custom color controls effortlessly!

About the Product

Incorporating a NTS Mobile Joystick into your game has never been simpler. Just drag the Joystick prefab onto your Canvas, configure the properties in the inspector, and seamlessly link the joystick to your player.

You can fully customize any NTS Mobile Joystick to seamlessly integrate with any game type or genre. Select or import your sprites, adjust the size and knob ratio, and choose your desired colors for a perfect fit!

  • Real-time adjustments in the editor
  • Use any graphics or sprites
  • Customize the size of the joystick and knob
  • Fine-tune your color scheme

Four unique joystick bases and knobs are available for free use and can be configured to your exact preferences.

Setup

Start by importing NTS Mobile Joystick into your project.

NTS Mobile Joystick requires a Canvas UI Object in your scene. Open the Prefabs folder and drag an instance onto your Canvas Object.

It's time to customize your joystick to fit the needs of your game! This is the fun part. Let's break down what exactly goes into NTS Mobile Joystick.

NTS MOBILE JOYSTICK

  • Joystick Anchor Position
    • Select an anchored position from the nine available positions.

Joystick Graphics

  • Joystick Base - Sprite
    • Sets the Joystick Base sprite
  • Joystick Knob - Sprite
    • Sets the Joystick Knob sprite

Joystick Properties

  • Size - float
    • Sets the size of the entire joystick based on the Canvas Scaler's Reference Resolution
  • Knob Ratio - float
    • Scales the joystick knob according to the joystick size
  • Normalize Knob - boolean
    • Normalizes the movement of the Knob
  • Horizontal Padding - float
    • Adds padding to the position of the joystick on the x axis
  • Vertical Padding - float
    • Adds padding to the position of the joystick on the y axis

Joystick Color Scheme

  • Base Released Color - Color
    • Sets the color of the joystick base when no input is detected
  • Base Pressed Color - Color
    • Sets the color of the joystick base when input is detected
  • Knob Released Color - Color
    • Sets the color of the joystick Knob when no input is detected
  • Knob Pressed Color - Color
    • Sets the color of the joystick Knob when input is detected
  • Lerp Color Values - boolean
    • When enabled, the Base/Knob colors will be interpolated between their Released/Pressed color schemes. Otherwise, their colors will change instantly.
  • Lerp Value - float
    • The value at which Color Schemes will be interpolated between

Linking the Joystick

Make sure your script has the Using Directive: NTS.MobileJoystick

Declare a field of type Joystick called joystick (or whatever you'd like) within your game objects script, and drag the joystick onto the inspector.

We have three options to get the input value from the Joystick:

  • GetInput()
    • Returns the Vector2 from the joysticks input
  • GetHorizontal()
    • Returns a float from the joysticks input on the x axis (between -1 and 1)
  • GetVertical()
    • Returns a float from the joysticks input on the y axis (between -1 and 1)

Now you can simply replace things like Input.GetAxis("Horizontal") with the joysticks methods via GetHorizontal()!

Feature Demo

This demo highlights the key features of the NTS Mobile Joystick asset. As a Feature Demo, it's designed to give you a clear look at what the joystick can do, showcasing its core potential for your projects.

Use Case Demo

The Use Case Demo gives you a firsthand look at how the NTS Mobile Joystick asset could perform in a real-world gaming scenario, allowing you to experience its functionality in action.