How do I know where's "inside" and "outside" when using LineZone? #778
-
Hi everyone! When I have a vertical LineZone, for example, and one object crosses the line from the left to the right. Does it sum up in "crossed_in" or "crossed_out", and how should I figure it out where is "inside" and "outside" on the image? And what if I had an inclined or horizontal line, what is the parameter used in the trigger() method of LineZone to differentiate if it should add in "crossed_in" or "crossed_out" attributes? I'm having a little bit of trouble trying to figure that on my own and would appreciate any help. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I/O is just a convention. Please take a look at the drawing below. If you want to reverse the count direction, pass the "end" point as "start" and "start" as 'end". |
Beta Was this translation helpful? Give feedback.
The convention is on the drawing; it is not random. If you look from the "start" point towards the "end" point, and the box travels from your right to left, it goes out. If from left to right, it is going in. Look at the arrow directions - you will see the pattern.