Jump to content

Graphic circle positioning


DaedraKyne
 Share

Recommended Posts

Hi all! :D New member here!

A few minutes ago, I was working on my game's prototype, when I realized something that kinda ticked me off 😅

So, I created two seperate graphics, both of them at the same position, containing each one circle (x = 0, y = 0), one of the circles with a fixed radius, and the other one with an increasing radius. Weirdly, these circles did not seem to be centered at the same spot, since the left side of the bigger circle is closer to the left side of the smaller circle, that the right side of the bigger circle to the right side of the smaller circle. Here are a few pics to show what I mean, as well as the code I used:
Circles: image.png.b09c33cb082a77461292e2322b1dfa65.pngimage.png.ffe4e59e1041484333c4f1e8b3dd0022.pngimage.png.8c1b8ee2def2811647edd8d6cb5300e9.png

Code: image.png.149b7193a3b137910494fa41b9bc31e3.pngimage.png.3e2a924c847084ffe845e252e74e8e20.png

 

Edit: Btw, the radius is augment every time by 0.02, so it's not a full number.

Link to comment
Share on other sites

? what do you mean, test? 😅 If I didn't explain well beforehand, I was trying to ask for help to find out why the two circles weren't in positioned/aligned the same, even though their x and y positions correspond. Also, i noticed this bug varies depending on the background colour, so it happens on a black background, but not on a white one.

Link to comment
Share on other sites

Those graphics align just fine up until you move them < now this is a clue to help you find the solution yourself. If you stop your code just after you add those 2 graphics on the stage then you always get perfect align, if you let your code go further then you lose the align. That should really help you figure that out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...