Homebrew Unity 3DS Circle pad configuration

A_stream

Member
OP
Newcomer
Joined
Apr 20, 2023
Messages
13
Trophies
0
Age
29
XP
272
Country
Bulgaria
Good day or Night. I'm currently making a Nintendo 3DS game using Unity, and I'm trying to make the character controller script use the Circle pad for controlling the character. But it only uses the D-pad, and it's not comfortable / nor do I want that control scheme. If there's a way to configure Unity's Input System that would be amazing. *Note: I know that there is a package that checks for input from the console (that's why the script works with the D-pad), but the It seems that the 3ds doesn't support Joystick axis for "Horizontal", "Vertical" and I don't know witch joystick button variable corresponds with the 3ds's buttons. Also I want to say that I'm only able to make a 2d scene and tweak the camera that it becomes a "3d" scene. Why? Because it doesn't export the game properly and the 3d camera doesn't show anything, and on Citra shows 0 fps.
 

A_stream

Member
OP
Newcomer
Joined
Apr 20, 2023
Messages
13
Trophies
0
Age
29
XP
272
Country
Bulgaria
Okay I found found a way to control the character using the circle pad.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.N3DS;

public class circlePad : MonoBehaviour {

public float speed = 10f;
public float jumpSpeed = 20.0F;
public float gravity = 17.0F;
private Vector3 moveDirection = Vector3.zero;
void Update () {
if (GamePad.GetButtonHold(N3dsButton.Emulation_Up))
{
transform.Translate(Vector3.forward * speed * Time.deltaTime);
}
if (GamePad.GetButtonHold(N3dsButton.Emulation_Down))
{
transform.Translate(Vector3.back * speed * Time.deltaTime);
}
if(GamePad.GetButtonHold(N3dsButton.Emulation_Right))
{
this.transform.Rotate (Vector3.up * 3f);
}
if(GamePad.GetButtonHold(N3dsButton.Emulation_Left))
{
this.transform.Rotate (Vector3.down * 3f);
}
CharacterController controller = GetComponent<CharacterController>();
if (controller.isGrounded) {
if (GamePad.GetButtonHold(N3dsButton.A))
moveDirection.y = jumpSpeed;
}
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);
}
}
 
  • Like
Reactions: Vasonic

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Oh cool that Bodycam games out
  • BigOnYa @ BigOnYa:
    Ratings for it are calling it bad, but it looks cool. Damn 48/100 rating.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa,
    looks are deceiving
  • BigOnYa @ BigOnYa:
    Yea people always down vote games anymore seems like, good or bad, bunch of haters
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, review bombing?
    +1
  • K3Nv2 @ K3Nv2:
    Yeah seems like people hate on original ideas anymore
  • K3Nv2 @ K3Nv2:
    Oh were sorry our small dev team can't shit out a cod clone every 6 months
    +1
  • K3Nv2 @ K3Nv2:
    Mostly positive on steam
  • BigOnYa @ BigOnYa:
    Eew, you use steam, I'm down voting you cause you not using or playing what I like.
  • K3Nv2 @ K3Nv2:
    Yes and epic and gog, sleep with me
  • K3Nv2 @ K3Nv2:
    Gay
  • BigOnYa @ BigOnYa:
    Homophobic
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, whats wrong with steam?
  • BigOnYa @ BigOnYa:
    Nothing, I was just teasing
  • K3Nv2 @ K3Nv2:
    He's a big tease trying to take my booty
  • BigOnYa @ BigOnYa:
    No, I don't wanna make ancientboi mad, I know you two already have a thing going
    +1
  • K3Nv2 @ K3Nv2:
    He divorced me once I threatened him with the fbi
    +2
  • Xdqwerty @ Xdqwerty:
    @K3Nv2,
    he also fucked uremum despite being gay
  • K3Nv2 @ K3Nv2:
    Yeah so did you and I want back child support pay enjoy the lawsuits
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, im virgin
  • K3Nv2 @ K3Nv2:
    So was mother Theresa
  • BigOnYa @ BigOnYa:
    @XdqwertyThat's ok, he is too
    +1
  • K3Nv2 @ K3Nv2:
    Uremum doesn't think so
    +2
    Xdqwerty @ Xdqwerty: https://www.youtube.com/watch?v=8zDleIZ-XoU