Well so the collision is probably either too high or too low. Its the only thing I think
LukasThorne
61
Posts
5
Followers
1
Following
A member registered May 23, 2022 · View creator page →
Creator of
Recent community posts
when I jumped onto a floating platform above me, I got bugged and couldn't jump.
Sometimes when you are on the floor the ground detector does not always work. Personally, in Unity instead of void OnCollisionEnter2D(Collider2D other) I prefer something more like this:
[Header("Layers")]
public LayerMask groundLayer; //the layer u are using for the ground
private bool isGrounded;
void HandleCollisions()
{
Vector2 position = new Vector2(transform.position.x, transform.position.y - 0.18f); //collider position
isGrounded = Physics2D.OverlapCircle(position, 0.2f, groundLayer); //ground detection
}
then you will see if you are on the ground with isGrounded like:
if (jumpInput && isGrounded)
{
}
I don't know if you are using oncollisionenter2d but i hope that helps u^^
Small alpine climbing simulator jam comments · Posted in Small alpine climbing simulator jam comments



