Homebrew Yay! Another Stupid Unity Thread!

  • Thread starter Thread starter Mr.ButtButt
  • Start date Start date
  • Views Views 3,727
  • Replies Replies 19
  • Likes Likes 1

Mr.ButtButt

The Cancer Of Gbatemp <3
Member
Joined
Sep 22, 2015
Messages
1,465
Reaction score
601
Trophies
0
XP
913
Country
United States
I've got a 1st person 3DS game up and running, but I can only move with the d-pad, and I can't look around.. I want to know how to only move with the circle pad, and look around with the c-stick. I've been using the default Unity First Person Controller. I'm wondering if I can edit the scripts, or I have to create an entirely new one..
I know Unity uses C#, but I do have basic C++ programming knowledge.

Anyone out there that can help?

(psst @Voxel )
 
  • Like
Reactions: Soulsilve2010
Use GamePad.CirclePad.x and GamePad.CirclePad.y to get the 3DS's respective Circle Pad axis coordinates. Use GamePad.CirclePadPro for the C-Stick/Circle Pad Pro.

For example, if I wanted to move the player forwards or backwards, I would write:
Code:
float MoveSpeed = 5f; //You can just set this at your desire...

transform.Translate(Vector3.forward * (GamePad.CirclePad.y*MoveSpeed) * Time.deltaTime); //this will move the player along its local Z axis, its speed based on the MoveSpeed variable.
 
Last edited by ,
Use GamePad.CirclePad.x and GamePad.CirclePad.y to get the 3DS's respective Circle Pad axis coordinates. Use GamePad.CirclePadPro for the C-Stick/Circle Pad Pro.

For example, if I wanted to move the player forwards or backwards, I would write:
Code:
float MoveSpeed = 5f; //You can just set this at your desire...

transform.Translate(Vector3.forward * (GamePad.CirclePad.y*MoveSpeed) * Time.deltaTime); //this will move the player along its local Z axis, its speed based on the MoveSpeed variable.
Thank you.
What the hell would we do without you?
I would be able to just do it myself, if the Unity Manual was actually like: "Okay here's how unity works!"
Instead of: "Okay, here's a thing. It works sometimes, maybe. Good luck."
 
Use GamePad.CirclePad.x and GamePad.CirclePad.y to get the 3DS's respective Circle Pad axis coordinates. Use GamePad.CirclePadPro for the C-Stick/Circle Pad Pro.

For example, if I wanted to move the player forwards or backwards, I would write:
Code:
float MoveSpeed = 5f; //You can just set this at your desire...

transform.Translate(Vector3.forward * (GamePad.CirclePad.y*MoveSpeed) * Time.deltaTime); //this will move the player along its local Z axis, its speed based on the MoveSpeed variable.
aLRIGHTY, here's part of the script:
Code:
 private void GetInput(out float speed)
        {
            // Read input
            float MoveSpeed = 5f; //You can just set this at your desire...

            transform.Translate(Vector3.forward * (???????.?????.y * MoveSpeed) * Time.deltaTime); //this will move the player along its local Z axis, its speed based on the MoveSpeed variable.

            bool waswalking = m_IsWalking;

#if !MOBILE_INPUT
            // On standalone builds, walk/run speed is modified by a key press.
            // keep track of whether or not the character is walking or running
            m_IsWalking = !Input.GetKey(KeyCode.LeftShift);
#endif
            // set the desired speed to be walking or running
            speed = m_IsWalking ? m_WalkSpeed : m_RunSpeed;
            m_Input = new Vector3(-1, +1);

            // normalize input if it exceeds 1 in combined length:
            if (m_Input.sqrMagnitude > 1)
            {
                m_Input.Normalize();
            }

            // handle speed change to give an fov kick
            // only if the player is going to a run, is running and the fovkick is to be used
            if (m_IsWalking != waswalking && m_UseFovKick && m_CharacterController.velocity.sqrMagnitude > 0)
            {
                StopAllCoroutines();
                StartCoroutine(!m_IsWalking ? m_FovKick.FOVKickUp() : m_FovKick.FOVKickDown());
            }
        }
I can still walk around with the d-pad, but not the circlepad..

--------------------- MERGED ---------------------------

How you build project in unity for 3ds?
You need to register as nintendo dev?
yes
 
Last edited by Mr.ButtButt,
Idk fam just didn't want him to get in trouble :)
I wouldn't have gotten in trouble. barely anyone saw this thread, let alone, would know what to do with the code before I edited the post. And if they did sue, I'd call 'em fat head, and they'd never bother me again ;)
 
I wouldn't have gotten in trouble. barely anyone saw this thread, let alone, would know what to do with the code before I edited the post. And if they did sue, I'd call 'em fat head, and they'd never bother me again ;)
Ha! Gottem. Anyways sorry for derailing the thread :p
 
  • Like
Reactions: Mr.ButtButt
I can still walk around with the d-pad, but not the circlepad..
Why do you have a bunch of question marks in your script where GamePad.CirclePad should be?

Also, don't forget to include the following line to the top of your script if you haven't already done so:
Code:
using UnityEngine.N3DS;
 
  • Like
Reactions: Mr.ButtButt
I wouldn't have gotten in trouble. barely anyone saw this thread, let alone, would know what to do with the code before I edited the post. And if they did sue, I'd call 'em fat head, and they'd never bother me again ;)
Free shop got DMCA ed and the guy just put and on another site and did not give a damn nothing will happen as long as you don't put it on Github.
 
Anyone have an example of using the gyroscopic sensor for example rotate a object(camera)? I notice that in regular standard assets there's tilt script in the cross platform but haven't tried it out yet or sure if it the samething
 
Last edited by haazet,
Why do you have a bunch of question marks in your script where GamePad.CirclePad should be?

Also, don't forget to include the following line to the top of your script if you haven't already done so:
Code:
using UnityEngine.N3DS;
I thought it was from the 3ds source in Unity or whatever. btw, i figured out how to use the buttons today, and got a game working!. If you get gyroscope working, ever, get in touch with me, I really need it for a project :)
 

Site & Scene News

Popular threads in this forum