How to Is_colliding with another node

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

Hi!
I am having problems with enemy object and player (both are kinematic and have fake gravity)
When enemy obj falls on player they both start shaking rapidly until one of them leaves or enemy object gets shoot away in horizontal way.
Im trying to solve it by making “is_colliding” with the player and then maybe turn off velocity (which is Vector2(0, gravity))
But i dont know how to call is_colliding with another node
When player is above the enemy, everything is fine…

:bust_in_silhouette: Reply From: avencherus

Something like this, but I think it has to be checked in the node doing the movement.

extends KinematicBody2D

func _ready():
	set_fixed_process(true)

func _fixed_process(delta):
	move(Vector2(0, 20 * delta))
	print(is_colliding())