0 votes

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 (moveandcollide).
In this case object2 will have to detect this collision in moveandcollide because object1 is in direction of object2's velocity.

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

Is there smarter way to do this collision efficently from main character's pyshicsprocess?

Second thought:

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

in Engine by (63 points)

1 Answer

0 votes
Best answer

Use area2D

It has area_enter() and area_exit() signals

by (331 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.