KinematicBody2D drags other kinematics body with it after update to Godot_v3.4.2.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 123


I have a question regarding the behavior of KinematicBody2D collisions.
In one of my projects, I recently updated Godot_v3.3 to Godot_v3.4.2. Afterward, I encountered unexpected behavior between my player (KinematicBody2D) and the enemies (also KinematicBody2D). In my game, the player should be able to jump off moving enemies.

The problem is that the player is dragging the enemy with it when colliding with it from below. After some experimentation (changed collision shapes, safe margins, movement, etc.) I did a minimal project to narrow down the problem.

Here is a video of the minimal project (Godot_v3.4.2) for demonstration of the issue:

enter image description here

In version Godot_v3.3 (same project) the problem does not occur:

enter image description here

While preparing the videos I wondered if the problem might be the “up_direction” of the move_and_slide() function of the enemies. So I changed it from Vector2.UP to Vector2(0,0). That finally seemed to fix things.

enter image description here

Nevertheless, I am wondering if this is the best way to deal with the problem and if it is the way Godot_v3.4.2 should handle this?

I also hope that if others encounter similar issues this post might help.

I forgot that word, but if I’m not mistaken, they added an additional feature to make the kinematic body move with a moving object (example: elevator) when it collides with it. If you haven’t solved your problem, I’ll look it up for you.
Or add a code to enemy. Dont interact if collide with the player

ramazan | 2022-01-09 11:00