We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I have a project where we have to make a target shooting game. however, I can't figure out how to work the dist function to figure out if the two circles are touching.
Heres the main class where I am having issues. Thanks in advance for any help
[code below]
Answers
Sorry, it formatted weirdly.
Best is to hit ctrl-t in processing first before copy paste into the forum (https://forum.processing.org).
You can edit your post (click the small gear and the 'Edit').
How to format Code:
Thanks for that help
please in processing hit ctrl-t to get auto indents in processing
can you post the entire code so that we can run it?
AND DO IT HERE
don't start a new thread when this one has nothing in it.
5 might be too small here
whenever I try to paste my code using ctrl-o or the c I get
you solved it?
No, that's all of the code that we need to use to make the project work. I just can't figure out how to tell when the cannonball and target collided
Please format it better
I am unsure how to
edit post, highlight code, press ctrl-o. That's all it needs.
Then read the Common Questions about arrays because hitcount20 etc is ridiculous.
Okay, thanks. there's the formatted one
Line 73 has a loop. But nothing inside the loop changes so you're just doing the exact same test 21 times.
That's the part where i was trying to test if the cannonball touched the target
Please use loops. Please. :((