0 votes

I have a small learning project in which I want to make a tiny mancala game, however, I realized that I haven't really worked out how to make it so the stones "fall into" each of the pockets and stay there.

Is there any way to "invert" the way that collision boxes work? So that the object only collides with the borders of the CollisionShape2D after it has entered it?

My idea was that once the player selected a pocket, an object would grab all the seeds inside it and drop them one by one inside the following pockets, but would rather not use physics objects, since I don't really know how to use them properly.

Godot window with a prototype Mancala board
Pocket class composed of a Node2D with an Area2D as a child, which contains a CollisionShape2D as a child

in Engine by (23 points)

1 Answer

0 votes

I think the answer you're looking for is on the Area2D, expand the Collision and play with the collision layers. I believe you'd want to uncheck the world Layer if you're still setup with default layers. Then there won't be any collisions but you can still tell when something has entered the shape. HTH

by (109 points)

Found a solution fiddling with the linear damp and gravity settings, but thanks for the advice! I keep forgetting about the helpfulness of masks and signals.

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.

Categories