# How do I create a lotto barrel

Get help using Construct 2

### » Fri Feb 27, 2015 2:46 am

Hello,
Im a bit stuck at this. I want to make a barrel by connecting up 8 rectangle 'planks'
and have a few balls in there bouncing around as it rotates. If i make a 'sprite' png
circle and try to put a ball inside obviously it starts on the top as the center of that
drawn circle is really a square.
I tried to use set collision polygon in a circle shape but its only recommended to use 8.
How to create a circle so a sprite can exist inside circle?
Is this easy to do thanks?
B
15
S
3
Posts: 19
Reputation: 944

### » Fri Feb 27, 2015 3:17 am

If you switch to using the Physics behavior, it will allow you to set the collision mask to a circle. Also consider that Physics may give you more control and make your bouncing balls more interesting.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

### » Fri Feb 27, 2015 5:05 am

Howdy, i already am doing that. Hard to explain..if you see example its a crappy square..i want a perfect circle
which i cant seem to do..any ideas?
Thanks
Went through the demos cant see how to make a circle made with inbuilt editor to be 'empty' inside
so working like the "square" example but is a circle...am i missing something?
You do not have the required permissions to view the files attached to this post.
B
15
S
3
Posts: 19
Reputation: 944

### » Fri Feb 27, 2015 5:16 pm

Here's how I'd do it:

furryBallsRotate.capx

You can increase the variable numberOfSides to make it rounder. I used sin() and cos() to convert the angle of the center object into X and Y position for the borders
You do not have the required permissions to view the files attached to this post.
B
87
S
22
G
15
Posts: 1,041
Reputation: 15,353

### » Sat Feb 28, 2015 12:36 am

Thanks, it was interesting to see how you did it. Im more visual in that i like to 'see' the circle
in the layout and its hard to imagine or place the rest of scene/objects without physically
seeing it..well for me
But...i can see some uses for this already and the maths is great learning too, so thanks for
that
EDIT: Oh,i guess i can use the green sprite as a placement of where i want the circle i guess.
Hmm..ok, thanks will try that.
B
15
S
3
Posts: 19
Reputation: 944