|Topic was automatically imported from the old Question2Answer platform.
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:
In version Godot_v3.3 (same project) the problem does not occur:
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.
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