Directions on how to modify ttc coordinates for your own screen coordinates Many of you will face a problem of translating the rectangles that the ttc finds in foundlist into coordinates that are placed appropriately on the screen for your pieces. Remember ttc produces rectangles with coordinates within a virtual video rectangle of rect (0,0,320,240). This rectangle has nothing to do with what people see on the screen unless you set it up that way. For example, say the active area of your piece is a rectangle that stretches from 100,100 to 640,480. Somone entering the left area of the ttc- sensed area will create a foundlist rectangle of something like rect(10,10,100,50). But what you will want to have happen on the screen starts at 100,100. You need to find a way to create equivalent coordinates that match where they are in ttc's virtual video rectangle with where you want them to be in your active screen rectangle. Those of you were there on friday 4/9 saw me do a demo of how to translate the coordinates. You had to offset the beginning and then figure out the proportional offset for your active rectangle. It turns out that Director has a function called map() that does the work for you. Here is an example of a routine that will do it for you. on modifyrect r1 global newrect -- in this example r1 is one of the rectangles that ttc gives you -- it is a parameter that you send to the routine by putting it -- after the on modifyrect -- you would need to put your rectangle to be modified into r1 before -- you called the routine -- for example r= rect(10,10,100,50) -- this is the original video rectangle that ttc uses sourcerect=rect(0,0,320,240) -- this is the rectangle you are trying to map to -- for example, your active screen rectangle destinationRect=rect(100,100,640,480) --this is the command that does the mapping -- newrect will have the coordinates changed -- then your routine could use newrect to control sprites on stage -- they would be relatively in right position newrect = map(r1, sourceRect, destinationRect) -- note that the rectangle gets stretched if the screen rect is bigger -- for example in this case newrect = rect(116, 115, 268, 179) -- if all you want is the coordinate of the rectangle -- you can use the map routine to just translate a point -- newcoord = map(origttcpoint, sourceRect, destinationRect) end You would call the routine right before you were going to position something relative the screen that people see. For example on exitframe global foundlist checknewchange if foundlist.count > 0 then r1 = getat(foundlist,1) modifyrect r1 sprite(5).rect = newrect -- a visual sprite moving like person end if end ================ Here is a copy of the help document from director map() Syntax newpoint =map(targetPoint, sourceRect, destinationRect) newrect = map(targetrect, sourceRect, destinationRect) Description Function; positions and sizes a rectangle or point based on the relationship of a source rectangle to a target rectangle. The relationship of the targetRect to the sourceRect governs the relationship of the result of the function to the destinationRect. Example In this behavior, all of the sprites have already been set to draggable. Sprite 2b contains a small bitmap. Sprite 1s is a rectangular shape sprite large enough to easily contain sprite 2b. Sprite 4b is a larger version of the bitmap in sprite 2b. Sprite 3s is a larger version of the shape in sprite 1s. Moving sprite 2b or sprite 1s will cause sprite 4b to move. When you drag sprite 2b, its movements are mirrored by sprite 4b. When you drag sprite 1s, sprite 4b moves in the opposite direction. Resizing sprite 2b or sprite 1s will also produce interesting results. on exitFrame sprite(4b).rect = map(sprite(2b).rect, sprite(1s).rect, sprite(3s).rect) go the frame end