Discuss Scratch

magpie5212
Scratcher
100+ posts

Drawing and detecting at the same time.

I have a project which draws a circle though three points. It is using a version of the hand method which involves detecting crossing lines. So, I draw one line and then draw the second, crossing line until I meet the first. I also use a border to detect the edge of the drawing area.

The problem I have is that during line drawing the crossing colour is not always detected. For example, drawing often continues into the border, detecting the border colour should have stopped it. I am assuming that what happens is the pen colour is being detected instead of the original background.

Does anyone have suggestions of how to reliably draw and look at the background at the same time?

forever
Simplify
end
MathWizz
Scratcher
100+ posts

Drawing and detecting at the same time.

You could probably offset the detecting sprite's rotation center so the costume is in front of where the line is drawn. Then the are the sprite is detecting will not be drawn on.

running Chromium 42.0.2311.90 with Flash Player 15.0.0.189 on Arch Linux 3.19.5-1-ck
MathWizzJsScratch && sb.js & Amber (coming soon! maybe)
magpie5212
Scratcher
100+ posts

Drawing and detecting at the same time.

Thanks MathWizz, been playing with the costume detail and it does change how things work.

forever
Simplify
end

Powered by DjangoBB