Godot 3.0 KinematicBody2D with CollisionShape2D reports no collisions against StaticBody2D with CollisionShape2D
I dont know if in the refactoring of Godot 3.0 collisions are still a WIP, if this is the case, please ignore this
Operating system or device - Godot version: Windows 10 Home 64bits Godot 3.0 VS 2013
Issue description: a simple KinematicBody2D with any CollisionShape2D and a gravity applied to it on its func _process(delta): goes right trough a StaticBody2D with a CollisionShape2D without reporting "is_colliding"
Steps to reproduce:
- create a KinematicBody2D
- add a CollisionShape2D (a rectangle of 10x10 would do) as a child of the KinematicBody2D
- create a StaticBody2D and place it bellow the KinematicBody2D (500px would do)
- add a CollisionShape2D (a rectangle of 100x10 would do) as a child of the StaticBody2D
- add some gravity in the _process(delta) E.g.:
var speed_y = 0
func _ready():
set_process(true)
func _process(delta):
speed_y += 100 * delta
move(Vector2(0,speed_y))
if is_colliding():
print("collision")
pass
(Bugsquad edit: fixed formatting)
Can you confirm that this issue isn't present in 2.x?
Also, does it still happen with _fixed_process?
Finally, your StaticBody2D isn't a child of your KinematicBody2D, I presume...
sorry I worte _process(delta): instead of _fixed_process(delta):, but the Bug is still the same: .-in 2.x collisions are very imprecise on _process(delta): .-in 3.0 it still happens if I mode the code to _fixed_process(delta): .-my StaticBody2D (ground) is not a child of KinematicBody2D (player)
thanks in advance
Tested on a build that is more than a week old...
Put a rigid body over the kinematic, you will see it colliding on the original kinematic position, looks like the shape is not updated, happens with position too and affects all the bodies and polygon shapes too.
I guess that the physics server is too unstable to do anything yet.
@bojidar-bg this is still tagged as "need testing", I think it should be tagged "confirmed", as it has been replicated by many, so it can be assigned to someone.
This makes the 2D framework almost unusable in its current state for most types of 2D games.
Thanks
Hm, I'm absolutely sure I tagged it as such, but seems thing went wrong somehow..
Thanks
Testing with a new build shows this is fixed from https://github.com/godotengine/godot/pull/7963
Nice!