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
  • No one is chatting at the moment.
  • Sicklyboy @ Sicklyboy:
    @BigOnYa, I'll rip a bag off my Volcano to that, brother
    +2
  • a_username_that_is_cool @ a_username_that_is_cool:
    DDDS . Dual Developer Dedede System :)
    +1
  • BakerMan @ BakerMan:
    also happy birthday @Xdqwerty
    +1
  • BigOnYa @ BigOnYa:
    Is it me you're looking for?
  • MysticStarlight @ MysticStarlight:
    'Cause I wonder where you are
  • MysticStarlight @ MysticStarlight:
    wait I got the lyrics mixed up
    +1
  • BigOnYa @ BigOnYa:
    And I wonder what you do...Lol
  • BigOnYa @ BigOnYa:
    Its all good, I'm here to talk to you.
  • BigOnYa @ BigOnYa:
    Hello
  • BigOnYa @ BigOnYa:
    I've been playing fallout4 all day, I went into a elevator and it kept going, never stopped, waited 5 minutes, must of been a bug. How bout you, whatcha do today?
    +1
  • MysticStarlight @ MysticStarlight:
    I'm wondering why a stray tuxedo cat has a cloudy eye
  • MysticStarlight @ MysticStarlight:
    I've been playing TOTK all day also
    +1
  • MysticStarlight @ MysticStarlight:
    Oh you reminded me of those elevator nightmares
  • BigOnYa @ BigOnYa:
    Awesome game, fun how they force you to build, but you can build as you want
  • MysticStarlight @ MysticStarlight:
    It is super fun, I actually prefer it over BoTW
    +1
  • BigOnYa @ BigOnYa:
    The guy holding the sign always cracked me up, esp when you fail, and it falls
  • MysticStarlight @ MysticStarlight:
    Ah yes, that guy lol. I still need to find all his signs. The game has a lot to do though so I don't know what to finish first
  • MysticStarlight @ MysticStarlight:
    I'm 120 hours in and am still like 44.4% done
    +1
  • BigOnYa @ BigOnYa:
    Good times. Building is starting to get good around now for you. You making me want to make run thru again.
  • BigOnYa @ BigOnYa:
    Ok good chatting, enjoy your gaming, and avoid the lightning, or put your sword away. Good night.
  • K3Nv2 @ K3Nv2:
    All I gotta do is not spend $10 in the next 5 days and I'll break even this month lol
  • K3Nv2 @ K3Nv2:
    @BigOnYa, tell your wife not to forget her wallet
    K3Nv2 @ K3Nv2: @BigOnYa, tell your wife not to forget her wallet