|
| 10 Mar 2014 11:11 PM |
A topic that confuses me is Verlet integration. How does it work? How is it integrated into ROBLOX Lua? Any help would be appreciated, thanks.
-Blank |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Mar 2014 11:50 PM |
It's quite complicated if you aren't aware of the backgrounds of this. If you don't know how F=ma, it's due to the derivative momentum/dx and momentum is mass* velocity. This is how forces are applied to the aspects of gaming.
Basic principles that must be acknowledged: -v=dx/dt -a=dv/dt
Now, since mass is given by roblox already pre-defining it (you can use GetMass function to check), if we know the velocity and acceleration , the distance over the time elapsed (dt) can be solved for.
d = vi * dt + 0.5 * ai * dti^2 which then can be identified as a more simpler term that you most likely have seen before...
d = vt + (1/2)at2
using integration: v= velocity v@current interval= v@pastinterval(currentinterval for lets say 1?) - a(pastinterval)* dt(pastinterval)
It's kind of hard to explain ._.
|
|
|
| Report Abuse |
|
|
|
| 10 Mar 2014 11:51 PM |
| pastinterval in the case would be its current interval -1 |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 12:17 AM |
I'm not sure I'd be very good at explaining, so I'll just link you to a useful article explaining it along with an actual application of Verlet Integration.
Just search "simulate tearable cloth" in google, and click the site one at gamedevelopment.tutsplus
It might take you a while to wrap your head around it, so just read carefully. |
|
|
| Report Abuse |
|
|