I'm using the 3DS Input System (using UnityEngine.N3DS and I'm trying to port a few games to 3DS, I have everything figured out except triggers
if (GamePad.GetButtonHold(N3dsButton.Y))
{
this.playerSpeed = this.runSpeed;
if (this.rb.velocity.magnitude > 0.1f & !this.hugging & !this.sweeping)
{
this.ResetGuilt("running", 0.1f);
}
}
if (GamePad.GetButtonRelease(N3dsButton.Y))
{
this.playerSpeed = this.walkSpeed;
}
This is the code for sprinting. I'm using the Y button but I would like to use the right trigger for sprinting not the Y button as I would like to use the X, B buttons for forwards and backwards movement and Y, A buttons for left and right.
Which brings me to my next thing how would I do that.
This is the code for movement controls:
a = base.transform.forward * Input.GetAxis("Horizontal");
b = base.transform.right * Input.GetAxis("Vertical");
if (GamePad.GetButtonHold(N3dsButton.Y))
{
this.playerSpeed = this.runSpeed;
if (this.rb.velocity.magnitude > 0.1f & !this.hugging & !this.sweeping)
{
this.ResetGuilt("running", 0.1f);
}
}
if (GamePad.GetButtonRelease(N3dsButton.Y))
{
this.playerSpeed = this.walkSpeed;
}
This is the code for sprinting. I'm using the Y button but I would like to use the right trigger for sprinting not the Y button as I would like to use the X, B buttons for forwards and backwards movement and Y, A buttons for left and right.
Which brings me to my next thing how would I do that.
This is the code for movement controls:
a = base.transform.forward * Input.GetAxis("Horizontal");
b = base.transform.right * Input.GetAxis("Vertical");