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
  • T @ Texasauras:
    its like $80 bro lmao
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, i'm too young and stupid and i don't have time to work
  • T @ Texasauras:
    it runs on android os
  • T @ Texasauras:
    it looks dope
  • BigOnYa @ BigOnYa:
    You get what you pay for. Go ahead and buy one those cheap Chinese units, you will see.
  • T @ Texasauras:
    bro have you seen the gfuel instagram
  • BigOnYa @ BigOnYa:
    @Texasauras why did you start a thread, ignored all the answers there, then come here to chat and ask the same thing. You gotta be like 12, bro
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Biker Mice from Mars needed a Sequel, Angry Hamsters from Uranus
  • T @ Texasauras:
    uh bro i was just asking have you seen these, help me look
  • T @ Texasauras:
    its on amazon
  • Psionic Roshambo @ Psionic Roshambo:
    Download Batocera make it your own
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    If you want GC PS2 Wii stuff like that use a PC
    +1
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, i also use my tv stick to watch YouTube and streaming services
    +1
  • BigOnYa @ BigOnYa:
    Psi those play well on the Pi5 now...
  • BigOnYa @ BigOnYa:
    @Xdqwerty yep that's what I use my stick for most anymore, streaming tv shows, movies. or even youtube. Or doing kens mum.
    +1
  • K3Nv2 @ K3Nv2:
    RG Cube is going to be good for ps2 if it's $100
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, and since the default emulator is below average i downloaded some "replacements" like snes9x for snes games for example
    +1
  • Xdqwerty @ Xdqwerty:
    And I also have my ps3
    +1
  • BigOnYa @ BigOnYa:
    Yea ps3 is a beast still to today compared to most "sticks"
  • K3Nv2 @ K3Nv2:
    If you just want pi for emulation no point when Anbernic releases new shit every two seconds
    +1
  • BigOnYa @ BigOnYa:
    What's really cool about Pi's tho is you can have multiple SD cards with different OS on each SD card and change from say a gaming machine to a full fledged pc if wanted
  • K3Nv2 @ K3Nv2:
    Plus all bios are set up and usually includes at least 128gbs or 64
  • K3Nv2 @ K3Nv2:
    Yeah but if your main goal is just to play n64 and GameCube you can save about $50 and have the portability option
    +1
  • BigOnYa @ BigOnYa:
    True, but on 2 monitors at 4k. Its just want you want really, to each they own.
    BigOnYa @ BigOnYa: True, but on 2 monitors at 4k. Its just want you want really, to each they own.