Choosing wisely types for my objects

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

Having object1 as main character.

Having N object2 s coming to the object1.

object1 and object2 should be moved only by script and not effected by the pyshics system.

What types should be object1 and object2?

My thoughts:

If i use KinematicBody2D for object1 and object2, object1 can’t detect all collisions but just the ones in direction of his velocity (move_and_collide).
In this case object2 will have to detect this collision in move_and_collide because object1 is in direction of object2’s velocity.

In this case i have to bloat _pyshics_process cycle for all of N object2 s.

Is there smarter way to do this collision efficently from main character’s _pyshics_process?

Second thought:

Having main character object1 as RigidBody2D, and other N object2 as KinematicBody2D ?

:bust_in_silhouette: Reply From: sparkart

Use area2D

It has area_enter() and area_exit() signals