0 Favourites

How do I create a lotto barrel

  • 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?

  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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?

  • Here's how I'd do it:

    [attachment=0:g9rbtdzv][/attachment:g9rbtdzv]

    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

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,153
karshinkoff's avatar
karshinkoff
Unread hot topic
56 4,736
MPPlantOfficial's avatar
MPPlantOfficial
Unread hot topic
0 Favourites
Why is Stencyl doing better?
44 16,859
Potato's avatar
Potato