This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote


I have a question regarding the behavior of KinematicBody2D collisions.
In one of my projects, I recently updated Godotv3.3 to Godotv3.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 "updirection" of the moveand_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.

Godot version Godot_v3.4.2 / Godot_v3.3
in Engine by (13 points)

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

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.