Detect individual Collisions

jbv jbv.silences at Club-Internet.fr
Sun Feb 29 06:26:41 EST 2004


Use the intersect fonction inside a repeat loop.
I did something similar last year : the user was drawing
a selection rectangle on the screen, and various objects
were changing their bordercolor in real time if they were
(or weren't) inside the selection rect. I was even able to
implement multiple selection (using the shift key and
comparing the current selection with a list of previous
selected objects).
Speed wasn't a roblem on a Mac 9600 / 300...

JB

> Hi there
>
> I'm trying to make a timeline-bar where you can add or delete rectangles containing "whatever". The user should be able to move a rectangle left or right, but if it collides with another rectangle, it should stop....
>
> Because the user is able to delete and add new rectangles I have to make some sort of function check if the moving rectangle is going to collide with other rectangles to the left and right. (like the timeline in Adobe Premiere) I know this is possible, but how do I do it fast..... Checking every rectangle with repeat is to slow.....and the only idea I have now is to make a list in a hidden field-table for every new created rectangle......
>
> any ideas....?
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list