New answers tagged platformer
5
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 ...
2
There are a couple setups that have become ubiquitous. Here are some common uses (non-exhaustive list):
Left stick for Player movement
Top-down shooters:
Movement direction
Clicking:
Ducks
Right Stick for Camera movement
Top-down shooters:
Shooting direction
Clicking:
Cycles zoom levels
Centers the camera on the player
Dpad:
Player movement
Side-...
0
The character can jump now without using horizontal move input, since i removed the move input requirement in order to wall jump.
line 161:
if (isTouchingFront == true && isGrounded == false && moveInput != 0)
to
if (isTouchingFront == true && isGrounded == false)
0
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;
Invoke("SetWallJumpingToFalse", wallJumpTime);
}
//...
void ...
1
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&...
0
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
Fix
In the character controller compoment i changed the step offset to 0
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.
0
You've nested your OnTriggerEnter2D method inside your Update method:
void Update()
{
void OnTriggerEnter2D(Collider2D other)//I try to check for the checkpoint but failed
{
if (other.tag == "End")
{
LoadNextLevel();
}
}
}
That means the method named OnTriggerEnter2D exists only when Unity ...
Top 50 recent answers are included
Related Tags
platformer × 3862d × 124
unity × 91
physics × 70
collision-detection × 65
c# × 61
java × 32
xna × 29
box2d × 27
libgdx × 20
javascript × 20
c++ × 19
camera × 17
movement × 17
game-mechanics × 17
collision-resolution × 16
jumping × 16
game-design × 15
tiles × 13
game-maker × 13
side-scroller × 13
tilemap × 11
sprites × 10
godot × 10
xna-4.0 × 9