Collision without motion

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

I’m trying to make a scroll shooter and want detect collision of meteors with my spaceship. I made RigidBody2D meteor and KinematicBody2D ship and added CollisionShape2D to each of them. Now there is collision, but when it happens, my spaceship moves right or left, being kicked by meteor, but i want just collision, not motion.
I tried:

  1. Add move(Vector2(0, 0)) in _fixed_process function - so, there is collision on screen, is_colliding is true, but also there is kicking
  2. Remove move() from _fixed_process function - there is no kicking, collision on screen, but i can’t detect it - is_colliding() always false.
    Is there right way to do it?

Bumping this question. How do I check if collision is true without having to use some function that updates automatically whenever a collision occurs?

HB | 2017-07-11 14:42

:bust_in_silhouette: Reply From: tiernich

on the Collision shape in the inspector set trigger to on this will report contact but not apply physics