Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeMar 8th 2015
     
    So here's what I have:
    ***** FRICTION *****
    Here are the possibilities we've considered:
    • The product of the two frictions
    • The geometric mean (sqrt(a*b))
    • The lower of the two
    • The higher of the two

    The following test denies three and four:


    Frictions 1000 on 0.001 get the same as 1 on 1. Therefore it has to be product-related.

    The only way I can determine one vs two is to have a single-bounce test, where the friction ideally restricts the velocity of the object. If it's #1 then frictions {1,2} will have twice the restriction as {1,1}. If it's #2 then frictions {1,2} will have sqrt(2) times the slowing of {1,1}. At least, I think this is how friction works.

    ***** RESTITUTION *****
    I'm 95% confident it's simply the higher of the two. When a 1-restitution object hits anything less than 1, the result is 1. Simple as that.
    We could use tests with the OnPostCollide function and get the linear velocity, but eh. Unless someone has a profound argument against it, we'll assume it's the higher number.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeMar 8th 2015
     
    On mine both blocks go "12.555648000000003" meters away from the start.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...
    • CommentAuthorXyuzhg (Moderator)
    • CommentTimeMar 9th 2015 edited
     
    A few years ago we had some discussion on this topic, and I've fished out the known results:
    - Friction is the signed geometric mean of the absolute friction values (or sgn(f1*f2) * sqrt(abs(f1*f2)) ).
    - Restitution is the greater of the two values.

    Here are the two results for reference (wow, I was young back then):
    Friction - http://forum.colorinfection.com/comm...
    Restitution - http://forum.colorinfection.com/comm...

    Good to see that you're thinking about this though!
    If you wanted to find it out for yourself, it's a matter of approaching it scientifically - try designing methods to obtain more empirical evidence like I did (to a limited extent) for restitution:
    -----------------
    Hopefully PA is inconsistent.
    •  
      CommentAuthorTheDudeFromCI (Advanced Member)
    • CommentTimeMar 9th 2015
     
    Why is it that? Multiplication of the two values would've made much more sense. :P
    That way, 0 restitution shapes would be able to actually stop a shape with >1 restitution completely. (Realistically.)-----------------
    Orange is my favorite number.
    • CommentAuthorpuzzle geek (Advanced Member)
    • CommentTimeMar 9th 2015
     
    I also did some testing with friction a while back, i add varuos identical balls of varing frictions ranging from 0 to 1.something, and i found that after a bit, there was no differance in the speed at which the objects went.-----------------
    puzzled
    •  
      CommentAuthorTapir
    • CommentTimeMar 27th 2015
     
    Xyuzhg is right.
    Here is the source code: https://github.com/Phyard/Phyard-Builder/blob/master/external/box2d_as3_v210/Box2D/Common/b2Settings.as

    This is the current implementation. It would be easy to support more implementations, even can be implemented as an event handler style callback.-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorTapir
    • CommentTimeMar 27th 2015
     
    btw, I moved the Phyard Builder project from bitbucket to github.
    I just added a feature request there: https://github.com/Phyard/Phyard-Builder/issues-----------------
    My games: Tapir Games
    My phyards: Tapir@phyard
    •  
      CommentAuthorMathdude314 (Advanced Member)
    • CommentTimeMar 28th 2015
     
    Unfortunately, I don't know Flash.-----------------
    If less people are active, that will only make for even less activity. Start making those designs!
    Currently working on a one-round no-elimination quick RP game...