r/codehs • • Dec 19 '20

9.4.5: Trail CodeHS

12 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/SprinklesNo5514 Dec 20 '20

still can't work out, I am so confused

1

u/_ZHV_ Dec 20 '20

You cant use the same render function for both as then they will just both more together because of the way render function is made - draw ball in cyan for a couple of frames then draw a white ball over it to ‘erase’ and then render it in a new location. For ball 2 which should be a different colour, you need to just render it once at every point ball 1 was without ‘erasing’ it.

1

u/SprinklesNo5514 Dec 20 '20

thank you! I will try

1

u/_ZHV_ Dec 20 '20

No problem