Godot 4 Tilemap Collision vs Staticbody Collision.
Asked Answered
R

5

0

Hi, anyone knows a way to make the collisions one big polygon collider as mentioned in the reddit post?
Here is the video on how the collisions work with Tilemap Collision vs StaticBody Collisions. The Balls are Rigibody2D.

Link To Reddit post

https://godotforums.org/assets/files/2023-03-14/1678786944-31698-2023-03-14-10-41-32.mov

Im not sure why the video is not showing here.

Rodgerrodgers answered 14/3, 2023 at 9:44 Comment(0)
P
0

The problem you're having is that the ball is not hitting the collision shape in the way you want it to? Did you carefully assign specific shapes to each tile?

Plumley answered 14/3, 2023 at 16:1 Comment(0)
R
0

Plumley the problem is the balls dont collide you would expect they change the direction without a reason. In the reddit post you can see in the video what i mean.

Rodgerrodgers answered 14/3, 2023 at 23:4 Comment(0)
P
0

Ah I had to watch the video a few more times. It's always nice if you describe the problem with text too. I have never seen anything like this but have only done similar work in 3.5. In my work the collisions work as expected.
All I can say for sure is you shouldn't need to use continuous detection for this.

Plumley answered 15/3, 2023 at 3:3 Comment(0)
R
0

Plumley Yea makes sense will keep it in mind.

The only workaround for now is to do this merge yourself with scripts. E.g. disable the TileMap collision and parse the polygons from the used cells and TileSet then merge them together with the Geometry2D class and set them on a StaticBody2D / NavigationRegion2D node.

Do you maybe know a way how to achieve this ?

Rodgerrodgers answered 18/3, 2023 at 19:5 Comment(0)
P
0

Rodgerrodgers I would definitely avoid doing that. Instead I'd opt to figure out to use the tool as it's intended and accept the possibility that b/c we're early in 4.0 there might be unresolved issues and missing functionality.

Plumley answered 20/3, 2023 at 13:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.