0 votes

I have a KinematicBody2d that plays a Tween when colliding with an object and then destroys itself.

How do I stop it from moving and generating collisions during the period of time that the tween is playing? How to do it recursively for it's children as well?

I have seen examples that use clear_shapes unfortunately KinematicBody2d does not have this function.

in Engine by (262 points)

1 Answer

0 votes
Best answer

I think this code would work.

kinematicBody2D_instance.collision_layer = 0
kinematicBody2D_instance.collision_mask = 0
by (9,700 points)
selected by
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 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 webmaster@godotengine.org with your username.