Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Blender Game Engine Tutorial: Trajectory Arc

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
487 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 7, 2011

As requested by AsCE

Link to .blend: http://sites.google.com/site/goranstore/trajectoryarc.blend

ERRATA:

As pointed out by Massimo (mb10 on BlenderArtists), the function used to calculate the arc points (defined as a lambda) is incorrect.

It should be defined as follows:

arc_point = lambda t: own.worldPosition + (vec_vel * t) + ((vec_grav * 0.5) * t * t)

Integral of the acceleration constant (-9.8 in our case) provides the formula for velocity at any time (-9.8t), and the integral of that would provide us with the formula for position at any time ( (-9.8/2)t^2 ) - In other words: Basic stuff you learned in school, but then forgot, because you never really cared much about falling apples, or how much time it takes for one to reach the ground if Jimmy drops it from the school roof, which is 15 meters high .... Oh, wait, I'm going into a rant about public education - Forgive me. :)

So, for our situation:

-9.8
initial_velocity + -9.8t
initial_position + initial_velocity*t + (-9.8/2)t^2

In this (correct) scenario, the acceleration constant of -9.8 is required to produce proper results, proving that my little "blender physics doesn't work right" bit at ~18:00 was pure nonsense - It works right - The error was in my formula (which I just derived through my own sense of logic, rather than the well established rules of Newtonian Physics).

Big thanks to Massimo for pointing this out.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (4)

Sign In or Sign Up now to post a comment!
  • Really great and interesting.

    I was a bit lost in the drawing part and in the coding afterward but I'll look at it a second time and I'm sure I'll manage perfectly. Thanks for making this!

  • Thank you, never knew it was so simple!

    Great tutorial as always Goran :)

  • this is great, nice tutorial =]

    subbed

  • Subbed. watched a few of your videos before and they are really interesting!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more