Make a sprite spin AND move in a direction

626 views
Skip to first unread message

Keith Price

unread,
Dec 13, 2013, 8:42:30 PM12/13/13
to mitappinv...@googlegroups.com
I'm New to App Inventor, but experienced VB programer...

As far as I can tell, you SPIN an object (such as a wheel) by continually updating its heading. Is that accurate?

But, then you MOVE an object by setting it's speed and interval. And, it moves in the direction of its heading. I'm I wrong?

If that's the case, then how would you spin an image AND make it move in a direction w/o creating a spiral effect? Simplest example would be a wheel spinning and moving across the screen.

TIA

Hal Abelson

unread,
Dec 13, 2013, 9:05:59 PM12/13/13
to mitappinv...@googlegroups.com
You're absolutely connect.  You couldn't just say "move" here.  You'd have to also update the position on clock ticks, by changing the x,y coordinates.  App Inventor is not designed for the kind of compound objects you want.  Maybe someday ...

Keith Price

unread,
Dec 13, 2013, 9:09:44 PM12/13/13
to mitappinv...@googlegroups.com
Ahh. OK. Thanks for setting me straight on that.

Scott Ferguson

unread,
Dec 13, 2013, 9:31:31 PM12/13/13
to mitappinv...@googlegroups.com
This cycloid demo rotates an ImageSprite 'wheel' as it moves across a Canvas. The movement in the X direction is synchronized with the wheel rotation.
I will work on an example done with AI2 that demonstrates a simple rolling wheel.
---
Scott

Scott Ferguson

unread,
Dec 14, 2013, 10:34:20 AM12/14/13
to mitappinv...@googlegroups.com
I just simplified the project in AI Classic. Converting to AI2 would be easy.
It is much simpler without the cycloid feature - basically a one-line formula.
---
hAPPy INVENTORing!
Scott

M. Hossein Amerkashi

unread,
Dec 14, 2013, 10:36:33 AM12/14/13
to Scott Ferguson, mitappinv...@googlegroups.com
Nice job Scott.

-Hossein.


--
You received this message because you are subscribed to the Google Groups "MIT App Inventor Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mitappinventort...@googlegroups.com.
To post to this group, send email to mitappinv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mitappinventortest/c0801e73-31ed-4ca5-b320-0b39f337e4e1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Keith Price

unread,
Dec 14, 2013, 1:50:58 PM12/14/13
to mitappinv...@googlegroups.com
Hey, that's GREAT! Thanks so much. All of you.


On Friday, December 13, 2013 5:42:30 PM UTC-8, Keith Price wrote:
Reply all
Reply to author
Forward
0 new messages