Homebrew Unity 3DS Circle pad configuration

A_stream

Member
OP
Newcomer
Joined
Apr 20, 2023
Messages
13
Trophies
0
Age
29
XP
269
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
269
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:
    I've been taking fiber pills, eating more grapes, switched to wheat bread in hopes to lower it
    +1
  • BigOnYa @ BigOnYa:
    I like wheat bread, I even like the chunky wheat bread with pieces of whole grain in it.
  • K3Nv2 @ K3Nv2:
    Been getting this honey wheat bread from aldis pretty decent not very sweet to out do it
  • K3Nv2 @ K3Nv2:
    Me making any food at home is an improvement to how I use to be
    +1
  • BigOnYa @ BigOnYa:
    I have an bread machine and use it alot, better than breads you buy, but don't last as long, cause no bs preservatives
  • K3Nv2 @ K3Nv2:
    I got compliments about my weight loss and thought well guess I can pig out again now I'm the piggy
  • BigOnYa @ BigOnYa:
    My biggest prob is alcohol, definitely is fattening
  • K3Nv2 @ K3Nv2:
    I know when to stop at least honestly don't get those that go and go with food
  • BigOnYa @ BigOnYa:
    Or those that order 2 big macs , large fry, ice cream sundie, then a diet coke
  • K3Nv2 @ K3Nv2:
    I might get downing two big macs but nah that's it
  • BigOnYa @ BigOnYa:
    Ok that will be $15.99, cash or charge?
  • K3Nv2 @ K3Nv2:
    My go to orders usually a mcdouble and a mcchicken and I'm happy rarely mess with fries
  • K3Nv2 @ K3Nv2:
    Pro tip ask for that clowns jizzmac sauce on your mcdouble
    +1
  • BigOnYa @ BigOnYa:
    Do they charge extra when you add sauce,etc? I know burger king used to not, but don't know nowadays
  • K3Nv2 @ K3Nv2:
    They may squrit it for free if you ask nice
    +1
  • K3Nv2 @ K3Nv2:
    Last time I got bk it was 35c per sauce fuck you king of my nutsack
    +1
  • K3Nv2 @ K3Nv2:
    I'll buy a bottle of baby rays BBQ for $2 and add it from home out of spite
    +1
  • BigOnYa @ BigOnYa:
    I like baby rays, my favorite is KC masterpiece tho. Figured all you could buy is that there.
  • K3Nv2 @ K3Nv2:
    The metro doesn't discriminate good sauce
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Baby Rays isn't that what killed the crocodile hunter?
  • Psionic Roshambo @ Psionic Roshambo:
    If only he had done an endorsement for them....
  • Psionic Roshambo @ Psionic Roshambo:
    Oy mate don't let a bad bbq sauce kill your party! Baby Rays are killing it!! The flavor hits you right in the chest!
    +1
  • Xdqwerty @ Xdqwerty:
    My phone only has 13% battery so i don't have much time left
  • Xdqwerty @ Xdqwerty:
    Now 12%
  • BigOnYa @ BigOnYa:
    Happy birthday, btw
    BigOnYa @ BigOnYa: Happy birthday, btw