Homebrew Unity 3DS Circle pad configuration

A_stream

Member
OP
Newcomer
Joined
Apr 20, 2023
Messages
13
Trophies
0
Age
29
XP
264
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
264
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
  • realtimesave @ realtimesave:
    lol there's a guy selling mig switch in usa on ebay for $200/ea he's definitely going to get nailed with dmca by tomorrow
  • ZeroT21 @ ZeroT21:
    Wasn't Metroid Prime 4 teased all the way back in 2017? For the switch no less?
    :rofl2:
  • ZeroT21 @ ZeroT21:
    Pretty sure anyone buying the switch just for that got duped
  • realtimesave @ realtimesave:
    for $200? rofl.
  • realtimesave @ realtimesave:
    well as far as metroid prime 4 is concerned, the next system probably is similar enough to the current gen they can probably easily just slap it onto a next gen cart and call it good :P
  • K3Nv2 @ K3Nv2:
    The switch was about 350 in 2017
  • Metoroid0 @ Metoroid0:
    mabe where you live
  • K3Nv2 @ K3Nv2:
    Nintendo president Tatsumi Kimishima took the stage at the outset to reveal that Switch will launch globally on March 3, 2017 for $299.99—earlier than some had expected at the price many suspected. https://time.com/4632820/nintendo-switch-nx/
  • Psionic Roshambo @ Psionic Roshambo:
    The NES launched at like 250 and the rob and light gun kit was like 350 or something
  • Psionic Roshambo @ Psionic Roshambo:
    I was near the test market for the NES and man did it make my 2600 look like ass lol
  • K3Nv2 @ K3Nv2:
    There has to be some mutual agreement with them all anything over $600 is just pc territory
  • realtimesave @ realtimesave:
    next system rumored to launch at $400
  • realtimesave @ realtimesave:
    but I don't really believe any rumors yet
  • realtimesave @ realtimesave:
    need to have official info from N
  • Psionic Roshambo @ Psionic Roshambo:
    The 3DO and Neo Geo where like 700 bucks hmm the PS3 was stupid expensive at launch lol
  • Psionic Roshambo @ Psionic Roshambo:
    But at least the PS3 was only 500 for the cheapest one at launch
  • Psionic Roshambo @ Psionic Roshambo:
    My opinion is that 199.99 is the sweet spot but that spot is long gone lol
  • Psionic Roshambo @ Psionic Roshambo:
    Just played some Micheal Jackson Moonwalker.... Those poor parents trying desperately to protect their children
  • K3Nv2 @ K3Nv2:
    400 is a decent sweet spot if we get enough out of it
  • K3Nv2 @ K3Nv2:
    It's not like how it was when we were locked down to a few options and that's it
  • Psionic Roshambo @ Psionic Roshambo:
    For me just buying a Pi and some accessories fills that not a PC void new consoles have just put them close to PC prices and all the patching and updates makes me feel like I might as well just get a PC
  • K3Nv2 @ K3Nv2:
    Were talking new Gen consoles at launch here
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah they just are glorified mid range PCs these days
  • Psionic Roshambo @ Psionic Roshambo:
    The age of home consoles has passed, they got assimilated
    Psionic Roshambo @ Psionic Roshambo: The age of home consoles has passed, they got assimilated