greendot Posted August 18, 2018 Share Posted August 18, 2018 I'm trying to strike an arc but I want to leave a gap in between. Something like this: https://codepen.io/weyseal/pen/MBNZqv?editors=0010 However, when I set a width for the fillStyle, I get this: https://codepen.io/weyseal/pen/ejqbvW?editors=0010 Is there a way to leave a gap in the last example to look like the first one? Link to comment Share on other sites More sharing options...
mapacarta Posted August 18, 2018 Share Posted August 18, 2018 I tested your code with phaser 3.11 and it is working fine. I tried different lineWidths, all works fine. Maybe there is a problem with 3.12 . It is still in beta you know. greendot 1 Link to comment Share on other sites More sharing options...
greendot Posted August 18, 2018 Author Share Posted August 18, 2018 You're right, @mapacarta, thank you for this observation! I was going crazy trying to find out why it wasn't working. Hopefully this is a bug in the beta version and not a "breaking" change. Link to comment Share on other sites More sharing options...
greendot Posted August 18, 2018 Author Share Posted August 18, 2018 Dealing with the same code, any ideas why the circle doesn't fully close on this example: https://codepen.io/weyseal/pen/OoLXpv?editors=0010 Link to comment Share on other sites More sharing options...
mapacarta Posted August 19, 2018 Share Posted August 19, 2018 There is an overshoot parameter when drawing an arc (the last parameter). In docs it says, it should be used to make the circle close fully if the width high. It is also in radian I guess, so you can try something like 0.1: graphics.arc(400, 300, 200, Phaser.Math.DegToRad(0), Phaser.Math.DegToRad(360), false,0.1); greendot 1 Link to comment Share on other sites More sharing options...
greendot Posted August 19, 2018 Author Share Posted August 19, 2018 Thanks again, @mapacarta, that indeed solved the problem I was having! Link to comment Share on other sites More sharing options...
Recommended Posts