[squeakland] point towards the mouse?

Scott Wallace scott.wallace at squeakland.org
Wed Nov 11 04:02:18 EST 2009


On Nov 10, 2009, at 11:02 PM, Darius Clarke wrote:

> For point 1 you can use the slope formula m = (y1-y2)/(x1-x2) and then arcTan m to get degrees. 
> 
> arcTan may have to come from Smalltalk mode. 
> 
> Cheers,
> Darius
> 
> On Tue, Nov 10, 2009 at 10:53 PM, Hilaire Fernandes <hilaire.fernandes at edu.ge.ch> wrote:
> For point 2.,  you may have to write the script in Smalltalk mode then
> use the code
> 
> ActiveHand x to get abscissa of the mouse pointer
> 
> Hilaire
> 
> 
> 2009/11/11 Bill Kerr <billkerr at gmail.com>:
> > 1) Is it possible to get an arrow to point towards the mouse pointer in
> > etoys?


FWIW I attach a working example... notice that it's all done with tiles -- no textual scripting.

 -- Scott


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pointTowardCursor.002.pr
Type: application/octet-stream
Size: 74873 bytes
Desc: not available
Url : http://lists.squeakland.org/pipermail/squeakland/attachments/20091111/20a4dfa1/pointTowardCursor.002-0001.obj


More information about the squeakland mailing list