gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
change this code to unity2d : isGrounded = Physics.CheckSphere(groundCheck.position,…
- User
change this code to unity2d : isGrounded = Physics.CheckSphere(groundCheck.position, checkRadius, groundLayer);
if (isGrounded && isJumping) { rb.velocity = new Vector3(rb.velocity.x, jumpForce, 0f); isJumping = false; } - Assistant
isGrounded = Physics2D.OverlapCircle(groundCheck.position, checkRadius, groundLayer);
if (isGrounded && isJumping) { rb.velocity = new Vector2(rb.velocity.x, jumpForce); isJumping = false; }