This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-09-18 16:05:34

jacool
Scratcher
Registered: 2008-01-25
Posts: 1000+

I need help with trigonometry :)

I've made a point to mouse script using trigonometry but it only works if the mouse pointer is in the top lest part of the screen since both the X and Y positions are positive there.
Is it possible to make the arrow point to the mouse anywhere?
A project showing it:
http://scratch.mit.edu/projects/jacool/685976


http://i571.photobucket.com/albums/ss159/JacobKar/svensktiger-1.png

Offline

 

#2 2009-09-18 17:26:37

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: I need help with trigonometry :)

The problem here is that Scratch doesn't have an ATAN2 function block.

But, here is a hint to help you:

http://i57.photobucket.com/albums/g228/BoltBait/PointAway.gif

Info: http://scratch.mit.edu/forums/viewtopic.php?id=5326&p=3

It keeps one sprite pointed away from another.  But, if you're smart enough, you should be able to get the info you need out of the drawing.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#3 2009-09-18 19:56:45

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: I need help with trigonometry :)

I remixed your project and it now works, but I won't share it unless you want me too. (You might not want me to give it away.)


http://i48.tinypic.com/2z5pqad.png

Offline

 

#4 2009-09-19 10:02:50

jacool
Scratcher
Registered: 2008-01-25
Posts: 1000+

Re: I need help with trigonometry :)

scmb1 wrote:

I remixed your project and it now works, but I won't share it unless you want me too. (You might not want me to give it away.)

Of course you can remix it!


http://i571.photobucket.com/albums/ss159/JacobKar/svensktiger-1.png

Offline

 

Board footer