Announcement

Collapse
No announcement yet.

Restitution problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Restitution problem

    I trying to create a match 3 game(just for fun), however i came across a problem. I create a tile and by using gravity i want them to fall down however when using physics the result is just terrible. I set the material setting restitution to 0 and the objects still bouncing... i found this post the author having the same problem and the post from 2016
    https://answers.unrealengine.com/que...nce-at-00.html
    Is there a solution for this?
    I added on component hit function to see whats happening.
    link to a video:
    https://www.youtube.com/watch?v=N-9B...ature=youtu.be
    So i added the next line of code to the on component hit function:
    m_BoxComponent->BodyInstance.bLockZTranslation =false;
    Surprisingly it did not solve the problem only mitigated it - the tiles are stopping vibrating much faster...i thought on the first hit of the object i will disable it ability to move... but nope...did not work.
    I cant think of something to do to solve it...

    #2
    Is there a reason for not just detecting the impact and disabling the physics simulation?

    Comment


      #3
      I set the material setting restitution to 0 and the objects still bouncing... i found this post the author having the same problem and the post from 2016
      Override Restitution Combine Mode like so:

      Click image for larger version  Name:	Annotation 2020-08-03 164934.jpg Views:	0 Size:	7.1 KB ID:	1796424

      Min here will ensure the lowest value from all encountered materials is used. Since it's clamped between 0-1, 0 will be used regardless of what other surfaces are set to.

      Comment


        #4
        Originally posted by MostHost LA View Post
        Is there a reason for not just detecting the impact and disabling the physics simulation?
        No, disabling physics has even worst result, meshes get stuck together or far a part.
        Originally posted by Everynone View Post

        Override Restitution Combine Mode like so:

        Click image for larger version Name:	Annotation 2020-08-03 164934.jpg Views:	0 Size:	7.1 KB ID:	1796424

        Min here will ensure the lowest value from all encountered materials is used. Since it's clamped between 0-1, 0 will be used regardless of what other surfaces are set to.
        I tried the override its not really helping...

        Ill just write a tick function, i wanted to save some time and write less code... o well...

        Comment


          #5
          i would wager that you have substep off and that whatever detection you are using to disable physics that gets them stuck is just incorrect.

          However if you need precision you are way better off scripting it than relying on physics...

          Comment


            #6
            Physics + Min Restitution at 0:

            https://i.gyazo.com/5d880e6911f2d170...f641fc3907.mp4

            edit: but perhaps I'm misunderstanding how you've set it up. All restitution below 1 does is absorb some of the (up to 100% at 0) energy for the object implementing it. The object with physical material and low restitution will still transfer and receive energy to/from other sources.

            https://i.gyazo.com/a6776467682a9e12...506c79e7fe.mp4
            Last edited by Everynone; 08-06-2020, 05:23 AM.

            Comment

            Working...
            X