KinematicBody collision problems

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By flonkopaten
:warning: Old Version Published before Godot 3 was released.

I have made my character (cube) with a KinematicBody and child node of MeshInstance, Camera and Area with a child node of a CollisionShape.
I did not find any good tutorial but i found out that it worked ok.

I detect the Collision with “func _on_Area_body_enter( body ):” and some code for what will happen when i collide (my character will die if i walk into a wall, and the scene will be reloaded).
This works fine a few times (randomly amount of times), and suddenly it stops to detect any collision.

I have checked the debugger and i noticed that everything is getting free on reload and its the same amount of objects and nodes every time, so that cant be the reason for this.

Something i notice is under “collision Pairs” (in the debugger) that the amount is getting lower when it stops detect any collision.

I really need to solve this problem for my game, so if some one can help me i am very glad.

Maybe i detect the collision in the wrong way? i dont know though its very hard to find tutorials.

Glad for any help i can get.

I am very sure it has to do with the “area” node, cause if i change from kinematic to rigid body everything works perfect.
So i might maybe use the rigid body instead, even though i dont use forces to move the character, i still can control the colliding i need, so no idea if it is wrong to use rigid body in other ways?
Any how about that “area” node, it might be a bug in godot?

flonkopaten | 2017-01-12 22:28

If happens often, turn on visible collision shapes and check if something is missing, you can try connecting all the signals by code instead to see if the problem is there, on the scene file connections too.


If RigidBodies never have that problem I can think on the layer implementation on kinematics too (masks are not working as they should), but I’m not sure…

eons | 2017-01-13 02:49