godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.71k stars 21.12k forks source link

RidigBody2D in Character Mode stucks at tiles corners and between 2 tiles (regression since 3.0.2) #19715

Closed Jeremi360 closed 6 years ago

Jeremi360 commented 6 years ago

Godot version: 3.0.2 and 3.0.3

OS/device including version: Linux Mint 19 x64

Issue description: In my title map platformer hero get stuck on titles corners and between them :( I use RigidBody in Character Mode. The code and title in previous version works fine. peek 2018-06-21 18-39

Steps to reproduce: Just run project and try to move hero using left, right and up (jump) arrows

Minimal reproduction project: Platfromer 2D.zip

akien-mga commented 6 years ago

The code and title in previous version works fine.

What previous version exactly? As I understand it the issue is reproducible in both 3.0.2 and 3.0.3?

Jeremi360 commented 6 years ago

@akien-mga it works correctly 3.0.0 and 3.0.1. Yes, issue is reproducible in both 3.0.2 and 3.0.3.

ghost commented 6 years ago

couple things: this was over 150mb in download for a zip, please try to reduce example projects

second: player's collision shape was scaled

third:

    if y > 0 and ray.is_colliding():
        $AnimationTreePlayer.oneshot_node_start("land")

removing this inside _process fixed everything. bug is related to oneshot_node_start. this is on 3.1, w10 e: and i don't even know if this is a bug internally or just not the right way to handle player movement. it's too subjective and dependent on what the developer is trying to accomplish

Jeremi360 commented 6 years ago

Thanks @girng It's a bug it works correctly in 3.0.0 and 3.0.1 , I reduced size and fixed scale

Jeremi360 commented 6 years ago

@girng I comment out this to lines and result is the same :(

ghost commented 6 years ago

@jeremi360 try a capsule shape instead of a rectangle for player body collision

yah you are right must be bug then since it worked in prev, sory

Jeremi360 commented 6 years ago

I change collision shape to capsule and now it's working

ghost commented 6 years ago

@jeremi360 glad you got it fixed sir!