How can I make my wheel spin?

539 views
Skip to first unread message

alistair song-white

unread,
Apr 10, 2015, 6:37:14 PM4/10/15
to mitappinv...@googlegroups.com
I am making a decision maker app. When the wheel (attached picture) is flung, the wheel will rotate for the duration of the acceleration amount.

my logic goes as follow:

When flung
   - Set xacl + yacl = timevariable
   - Repeat
     - Heading +1
   - If timevariable = clock
     - Stop

Unfortunately I am having trouble actually making the code in blocks. I can't seem to get the program to function.

Can anyone help me make this in blocks?

Thanks,

Alistair
yesornowheel copy.png

SteveJG

unread,
Apr 10, 2015, 8:44:36 PM4/10/15
to mitappinv...@googlegroups.com
First you should consider downsizing your decision wheel.   It is currently 2400 x2400 pixels; perhaps 200x200 would fit on your Android screen better.

Second...Rotate is a misnomer...I do not know why MIT selected that terminology.  Rotate does not rotate a sprite--" it makes the sprite image show rotated when you change the heading"- MIT's words, not mine.  So you need to do something to make the heading change.  The following works


You will need to adapt the blocks to your app.  The button turns off/on the rotation.  The wheel is 200 x 200 pixels and placed on the canvas as per the x/y shown.


Regards,
Steve

alistair song-white

unread,
Apr 11, 2015, 1:04:44 AM4/11/15
to mitappinv...@googlegroups.com



Thanks for the resizing tip. Looks better now!

Here's what I've got so far. The only problem I am having is that the clock doesn't read the time I don't think. So it doesn't stop when it hits the timervar number.

alistair song-white

unread,
Apr 11, 2015, 5:31:12 AM4/11/15
to mitappinv...@googlegroups.com
figured it out thanks. =)
Reply all
Reply to author
Forward
0 new messages