- Home /
Physics Calculation: How to Calculate where Rigidbody will Drop ?
My friends, I am really bad with maths, and need some help please, somebody have a math to detect where a rigidbody will fall/drop ? for example, I would like to draw a curve/line pointing the final path of a grenade or somethings like that, Like Used in Angry birds space, or Gears of wars ( throwing a grenade ). I can imagine somethings with tangents, mass, velocity, but I am really bad with these stuff.
Many thanks.
Answer by cdrandin · Jan 24, 2013 at 11:13 PM
You don't need to know where it falls per say, but create a curvature algorithm in which can be followed. Out of simplicity,let's use -2(x-1)^2+2 @ x=0,y=0 and x=2,y=0. So there is the simple path. Now knowing this algorithm give in points of x, increments of 0.5, which will then have 4 coordinates outline this upside down parabola. At these points instantiate a texture dot and there you have your outline, of course this is very simple and is static. So this is not something that would be used in Angry birds because this algorithm isn't flexible.
I actually found an Angry mimic, read the source code. http://fafase.comuf.com/Content/Project/AngryBird.zip
The object object being tossed is the sphere, so look at the script.