Collisions and default positions.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nick888

I have a first kinematicbody2d which is composed with a trampoline in the center and two firefighters on left and right. I move it left and right with this kind of movement:


The first kinematicbody2d does two default specific movements to the right and two default specific movements to the left.
In the center (trampoline) of first kinematicbody2d i have a collisionshape2d .
Now, second infinities kinematicbodies2d falls from the sky and touches the collisionshape2d(trampoline) .When the second infinities kinematicbodies2d detects the collision of trampoline then make this movement:

var collision=move_and_collide(vel*delta)
if collision:

On firefighters I have respectively two Area2D with Collisionshape2D and if the second infinities kinematicdodies2D touches a firefighter then the second infinities kinematicdodies2D disappears:

func _on_Area2D_body_entered(body):


So far all good.

My problem is that except that the second infinities kinematicbodies2D disappears if they touch the firemen,when i move the first kinematicbody2D (“ui_right”,“ui_left”) and the second infinities kinematicbodies2D touch the firemen they simultaneously changes the predetermined position of the first kinematicbody.
Is there any way that the second infinitieskinematicbodies2D to disappear but without changing the predetermined position of the first kinematicbody when they touch the firefighters?

Thank you in advance and i am sorry about my english.

The kind of firefighters CollisionShape2D is a RectangleShape2D.

Nick888 | 2019-06-24 07:50