A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: stable gravity integration?

Threaded View

  1. #1
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    923

    stable gravity integration?

    I tried smth like:

    a = -r^-2;
    v += a * dt;
    x += v * dt;

    but, major problem with this is when particles go close to each other they gain a LOT of speed.

    I tried constrain acceleration like:

    a = -Math.max (const, r)^-2

    But this does not help much. I was thinking about advanced integration like RK etc, but does it really help in this situation? Anyone with experience in this please comment.
    Last edited by realMakc; 03-07-2008 at 12:06 PM.
    who is this? a word of friendly advice: FFS stop using AS2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center