0 votes

There's an "Margin" option in CollisionShape, for some reason i can't turn it down to 0, and it causes some unwanted artifacts, I have a simple scene: camera casts ray from mouse position, and a block that snaps to the side of block, everything seems simple but when you hover over the edge of collision shape, this occurs:

Hovered over edge of block, Top side, left top edge
Hovered over edge of block, Top side, left top edge

This shouldn't be in my game. At first I thought it was my issue, but then I dug up and found out that its not, its the margin parameter that is causing it to happen. I stumbled upon a post with this picture attached, which appears to be normals of the collision shape


This is very vital aspect and I can't simply dismiss it, is there any solution to this?

in Engine by (12 points)

I don't think you can turn it off completely (you also don't want it at zero because that would cause collision problems) but you can set it to 0.001, also 0.8 means .8 of a pixel and since the graphics would not show being 0.8 (they would be rounded towards the cube making 0.8 seem like 0) also I cant see any problems I even opened the image in a new tab and zoomed in.

The problem in image is obvious, it snapped to the back, which is an invisible (unreachable) side.

Please log in or register to answer this question.

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.