Gravity Exercise

750 views
Skip to first unread message

Scott Ferguson

unread,
Sep 7, 2015, 10:03:20 PM9/7/15
to app-inventor-de...@googlegroups.com




Changes log:

2015/09/08 - bug fix -- ball could stick to canvas bottom; new version is 2


---

END of changes log


Fling anywhere on the the Canvas to see the gravity demonstration.


Try adjusting the gravity, bounciness and rolliness values to simulate different materials and bodies (earth - 1.5 vs the moon - 0.25)


How it works: 

A Clock Timer is used to update the position of a ball by applying x and y velocities and gravity.

When the ball bounces a bounciness multiplier reduces it's y velocity until it eventually stops bouncing.

When the ball rolls, a rolliness multiplier reduces it's x velocity until it eventually stops rolling.

---

sf

GravityExercise.aia

Abraham Getzler

unread,
Sep 7, 2015, 11:02:11 PM9/7/15
to app-inventor-de...@googlegroups.com
Nice demo, but my ball mostly just lays there.
I may need to consult with my personal physicist.

ABG


On Mon, Sep 7, 2015 at 10:03 PM, Scott Ferguson <scottfr...@gmail.com> wrote:




Fling the Canvas to see the gravity demonstration.


Try adjusting the gravity, bounciness and rolliness values to simulate different materials and bodies (earth - 1.5 vs the moon - 0.25)


How it works: 

A Clock Timer is used to update the position of a ball by applying x and y velocities and gravity.

When the ball bounces a bounciness multiplier reduces it's y velocity until it eventually stops bouncing.

When the ball rolls, a rolliness multiplier reduces it's x velocity until it eventually stops rolling.

---

sf

--
(you have received this message from the App Inventor Developers Library)
---
You received this message because you are subscribed to the Google Groups "App Inventor Developers Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-develope...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Ferguson

unread,
Sep 8, 2015, 7:30:29 AM9/8/15
to app-inventor-de...@googlegroups.com
:-)
Are you flinging the canvas (not the ball itself) in a upward direction?
If the ball doesn't move much, you can reduce gravity and/or increase the FlingVelocityAdjustment value to be more responsive.

If the ball sticks to the bottom of the canvas rather than bounce sometimes that (hopefully) has been corrected with a bug fix in updated version 2 which is attached here and in the Gallery.
Thanks for trying it out!
---
sf
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-developers-library+unsubscribe@googlegroups.com.

Benni Keller

unread,
Jan 27, 2020, 10:33:22 PM1/27/20
to App Inventor Developers Library
Nice Job. I hope you can help me, despite publication 2015.
I need a option for bouncing from other balls. Like this:
conzept_fb.png

I would like to make it so that the ball falls and if it hits an obstacle it should bounce off and in the end this ball falls into a container at the bottom.

There it should then be checked in which container it fell and how many points this gives.


Thanks.

Taifun

unread,
Jan 28, 2020, 7:43:40 AM1/28/20
to App Inventor Developers Library
you already asked your question in the Kodular community here https://community.kodular.io/t/image-sprite-falling/50152/4?u=taifun
please respect the rules of this forum...

You are welcome to leave replies for existing posts, but you may not create a new post asking for support.
Why? Because this group is an *ARCHIVE*, not a support forum.
Since the way permissions are setup with Google groups, in order to allow replies to existing posts, I must allow new posts.
And I do want feedback!
So please honor my wishes on this.

Taifun


Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.        



Michael Ferguson

unread,
Feb 12, 2020, 5:47:10 PM2/12/20
to App Inventor Developers Library
Hi, Taifun!
Perhaps turn off the ability for users to post to avoid frustration, if that is possible?
---
Scott Ferguson

Taifun

unread,
Feb 13, 2020, 11:36:02 AM2/13/20
to App Inventor Developers Library
I not changed the following settings

Unbenannt.JPG

and

Unbenannt2.JPG

All the best!
Taifun
PS: See you probably one day in the community here https://community.appinventor.mit.edu/
Reply all
Reply to author
Forward
0 new messages