# Circular collision shape with object inside

Attention Topic was automatically imported from the old Question2Answer platform.

Hi everyone,

I am new to godot (and in game development). I am trying to develop a ball maze puzzle game in which one or multiple balls will rotate inside a maze and according to device’s orientation they change the direction. The aim is to move all the balls in innermost circle; similar as the game mentioned in link below.

I have used ball as rigid body & maze as static body. Ball has circular collision shape. For maze I have used Create CollisionPolygon2D Sibling to automatically generate the collision shapes. I am facing following issues:

1. The major problem is with the outermost circle, which is a closed circle. The generated collision shape covers the whole inside area. I cannot place ball inside it, if tried, the ball is shown outside the maze at run time. What can be done to make a circular unfilled collision shape.

2. Secondly, the generated collision shapes are not perfectly circle (nor polygon). I tried by decreasing the Simplification factor, but still instead of a polygon-like shape, there are zigzag lines (only vertical & horizontal segments, no slanted segments). Is there any other way or we have to edit the points manually only?

Please have a look at this game: Ball Trap - Roll the Ball

Thanks!

To make a circular unfilled collision shape, try making half of it with a `CollisionPolygon2D` and then just duplicate and rotate that to “complete” the unfilled circle, you can put them both as children of a `StaticBody2d` if you need them to rotate together or something.

Not sure how can i help about the second one, tho.

Hope this helps!

As my sprite has multiple shapes and I was using Create CollisionPolygon2D Sibling, I was getting multiple collision shapes; one for each shape in the sprite. That led me to conclude that every shape in the sprite should have a single collision shape. I didn’t thought that I can use multiple collision shapes for a single sprite shape, thanks for the hint !!!

In the meanwhile after posting this question, somehow I solved the problem. Here is what I have done (it may help somebody):