Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | equus |
Hello! I have a KinematicBody2D and a RigidBody2D. I need to check if the kinematicbody collides with the rigidbody but it is not working and I don’t know why. The collision occurs but the code does not print anything.
Here is the code in the KinematicBody:
Here is the KinematicBody2D node parameters:
Here is the KinematicBody2D collision shape:
Here is the RigidBody2D node parameters:
Here is the RigidBody2D collision shape:
I tested another way to check the collision using RigidBody2D body_entered signal and it is working fine, but I need to check the kinematicbody2d collision with the rigidbody using move_and_collide because I need to know if both collide in advance.
Here is the code:
I have something very similar but even the body entered signal won’t work.
Everything work if I just change one of the two bodies to StaticBody2D.
Did you find a workaround?
LouisSimon22 | 2019-10-27 16:22
The problem I had was not related to the code I posted here. In fact, there was another part of the code that was causing the problem. The people at Discord helped me to solve this.
equus | 2019-10-27 20:16