Most importantly: plan for remappable controls from the start.
Different games use different conventions, and different players have different preferences. This is also important for accessibility - not everyone plays with the same hardware - electrically or biologically speaking - and the ability to remap controls can turn an impossible game into a ...
There are a couple setups that have become ubiquitous. Here are some common uses (non-exhaustive list):
Left stick for Player movement
Right Stick for Camera movement
Cycles zoom levels
Centers the camera on the player
The character can jump now without using horizontal move input, since i removed the move input requirement in order to wall jump.
if (isTouchingFront == true && isGrounded == false && moveInput != 0)
if (isTouchingFront == true && isGrounded == false)
You should use Debug.Log() to better understand what your code is doing:
if (Input.GetButtonDown("Jump") && wallSliding == true)
Debug.Log("Started wall jumping. Will stop in " + wallJumpTime);
wallJumping = true;
Simpler approach is to set "Stretch Mode" (in project settings under Display -> Window -> Stretch) to "Viewport".
With "Stretch Mode" set to "Viewport", the rendered resolution will match the design resolution (in project settings, under Display -> Window -> Size). This may result in enlarged "pixels&...
This question has been answered, thanks to DMGregory for editing this, because if i didnt have those specific keywords i wouldnt have been able to find answer
In the character controller compoment i changed the step offset to 0
I really did not want to resort to the one collider per character solution. Even if it is a widespread approach, I feel satisfaction by making the character colliders as accurate as possible. So, I just added an edge collider under the character. A lot of my issues got gone after that. Including the issue described in the question.
You've nested your OnTriggerEnter2D method inside your Update method:
void OnTriggerEnter2D(Collider2D other)//I try to check for the checkpoint but failed
if (other.tag == "End")
That means the method named OnTriggerEnter2D exists only when Unity ...