DaedraKyne Posted May 4, 2018 Share Posted May 4, 2018 Hi all! 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: Code: Edit: Btw, the radius is augment every time by 0.02, so it's not a full number. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 4, 2018 Share Posted May 4, 2018 Make a fiddle. Quote Link to comment Share on other sites More sharing options...
DaedraKyne Posted May 4, 2018 Author Share Posted May 4, 2018 Edit: Oh right here you go: https://jsfiddle.net/7afzr91g/61/ @ivan.popelyshev ? Quote Link to comment Share on other sites More sharing options...
DaedraKyne Posted May 4, 2018 Author Share Posted May 4, 2018 Bump :3 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 5, 2018 Share Posted May 5, 2018 How do I test it? i just see two circles. Quote Link to comment Share on other sites More sharing options...
DaedraKyne Posted May 5, 2018 Author Share Posted May 5, 2018 ? 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. Quote Link to comment Share on other sites More sharing options...
botmaster Posted May 7, 2018 Share Posted May 7, 2018 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.