0 votes

So basically this is me making a player scene and making two players from that scene.

This causes the physics collision between players to sometimes have one player detect the other or both players detect each other.

There was no consistency. How to fix.

Godot version 3.3
in Engine by (18 points)

1 Answer

0 votes

Answering my own question b/c I think it will be helpful. Also created it to be easier to search up as I answered it in another thread where I accidentally found the solution.

Link to thread: https://godotengine.org/qa/8923/kinematic2d-collision-detection-not-working-in-some-cases

Solution simple: Lower Collision margin in inspector for KinematicBody2D.

Solution from thread:

Thank you. Your Solution with collision margin helped me solve different problem.

I had a problem with two players, both KinematicBody2D colliding and not handling the physics event properly.

Where sometimes it one would detect the other or other times both detected each other.

By lowering the collision margin in the inspector window of the KinematicsBody2D I was able to fix the problem. I made it from 0.08 to 0.01.

Then only one of the two bodies was detecting the other. Namely the one which started it.

*Only basic testing was done so do your own tests on this as well.

by (18 points)
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 webmaster@godotengine.org with your username.