Forgive me if this
a) does not belong in advanced topics.
b) is n00bish.
or
c) all of the above.
I've been working on this trigonometry pendulum type thing, and I've been getting some glitches.
http://scratch.mit.edu/projects/coupdegrace/1602685
You are supposed to be able to swing the pendulum different speeds with your mouse. But if you swing it in one direction, it "bounces". I've tried testing for negatives, absolute value, etc.
I need help.
Thank you in advance.
Last edited by coupdegrace (2011-02-17 18:04:50)
Offline
If it's going in the opposite direction when in the top-left corner, reverse the direction when when in the top-left corner.
[blocks]
<if><< <( <direction> <>> -90 )> <and> <( <direction> <<> 0 )> >>
<set{ TurnVel. }to( (( <{ speed }> <*> -0.3 ))
<else>
<set{ TurnVel. }to( (( <{ speed }> <*> 0.3 ))
<end>
[/blocks]
Problem solved.
Last edited by floppy_gunk (2011-02-18 14:57:25)
Offline