0 votes

Hello people,

I'm using the Godot 2.1.4...
I have a project under development and wanted to know how to make a kinematicbody not collide with just a staticbody?

Can someone help me? please!? :)

in Engine by (150 points)

1 Answer

+2 votes
Best answer

That is what layers and masks are for.

Collision layers and masks

Collision bodies, such as your KinematicBody and your StaticBody, may be in one or more layers determined by the Layers property and set what layers they look in for colliders with the Mask property. Body A detects a collision with Body B if B is in a layer that's set in A's mask.

To make your KinematicBody pass through your StaticBody you'd set their layers and masks to make sure none of the StaticBody's layers match the KinematicBody's mask and none of the KinematicBody's layers match the StaticBody's mask.

This question is about the difference between layers and masks.

by (291 points)
selected by

Many thanks Aaron, gave to understand how it works!! ^^

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 Frequently asked questions and 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 [email protected] with your username.