Announcement

Collapse
No announcement yet.

UE-56479: Jittering effect with Physics Constraint Actor using Linear Limits

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

    UE-56479: Jittering effect with Physics Constraint Actor using Linear Limits

    Link: UE-56479

    I have been asking for help in answer hub for several months and never get any reply/answers. Wish to have some luck here. I am forced to stick with UE4.18.3 because the problem exists in 4.19-4.21 and it is marked "Won't Fix". Does that mean no one ever uses linear limits with physics constraint? How do I make a dangling sphere like the sample project in UE4.21? Thank you.
    Last edited by kevterm; 11-24-2018, 01:35 PM.

    #2
    Correct me if I'm wrong but isn't the dangling sphere only using angular limits?

    I was able to get appropriate linear limits working on a skeletal mesh's physics asset in 4.21 but it might not behave the same if I apply the same constraint to a blueprint. I won't have time to test this week.

    Comment


      #3
      Thank you for your reply, NotSoAccurateNo1.

      Angular limits are not relevant to my case because I am not limiting the angle of swinging. I am using linear limit because I wish to simulate the length of the cable by setting the value of linear limit Z. However, that will make the sphere behave strangely.

      I modified the sample project to better illustrate the problem. There are now 3 sets of dangling spheres. From left to right:
      1: The original swinging sphere
      2&3: The spheres are located right below the respective physics constraints so that they will become stable when linear limit (Z) is reached
      Click image for larger version

Name:	setup.png
Views:	1
Size:	376.9 KB
ID:	1555683

      When play/simulate, a fourth sphere, as it falls, will touch sphere 2 and I expect sphere 2 to just swing left and right slightly. However, it will shake violently like sphere 1.
      Click image for larger version

Name:	playing.png
Views:	1
Size:	378.9 KB
ID:	1555684

      Link to modified project: https://answers.unrealengine.com/sto...-myproject.zip

      Comment


        #4
        As some new marketplace items no longer support 4.18, I really wish to proceed to use the latest version. Please, if anyone has any idea about the problem, do say something. Thank you.

        Comment


          #5
          Try putting the Physics Constraint in the world as a separate actor (superimposed with the cable actor) rather than attached/parented to the cable actor. It seems to fix the issue in your case (even if it's more like a workaround; it's definitely bad when new "Won't Fix" jitter appears where there wasn't any).
          Last edited by GeyserToo; 01-29-2019, 12:40 AM.

          Comment


            #6
            Thanks a lot for your reply, GeyserToo. I did a quick test as you suggested but the problem still seems to exist (link to project). The sphere on the right has a separate physics constraint actor while the sphere on the left was like before. Both spheres shake after the falling sphere touches them (image below). If you get it to work differently, do you mind uploading a sample project? Thank you.

            Click image for larger version

Name:	UE56479.png
Views:	1
Size:	410.4 KB
ID:	1578249

            Comment


              #7
              What is the expected behavior here? The previous example has just one sphere falling straight down, but here the middle sphere nudges the other two sideways. If you want to allow them to swing freely then why is their constraint "locked" along X and Y? or is your point that you expect those two spheres to remain on their Z-aligned "rails", without being affected by the nudge?

              EDIT: OK, I'm confused. So many different tests for such a simple question... All those *are* supposed to be pendulums, right? And pendulums on rails, sort of? Your intention is that the cable/rail should be allowed to rotate in the XZ plane (around the top constraint), and the sphere should be alllowed to slide along the cable/rail, with a maximum cable elongation of 200 world units? In that case I am not sure the locked X and locked Y are appropriate here. If anything, you should be using a chain of two constraints: one for the rotation degree-of-freedom at the top of the rail, and then a linear degree-of-freedom for sliding along the rail. And then I suppose you should carefully adjust the physics properties of the rail and the sphere (collision type, mass, etc). If this is an actual cable though, then why not use it as such, with linear limits of 200 in the XZ plane, without "locking" along X? (if you unlock X, then you no longer need rotation freedom at all).
              Last edited by GeyserToo; 01-31-2019, 01:53 PM.

              Comment


                #8
                GeyserToo, I apologize for the confusion. Sample 266882 was just to show that the sphere still jitters even if I used a separate physics constraint actor. Besides, my game is a side-scroller and I had to put some physics limits; I should have removed them in the first place. Anyway, I made another sample (link) in the past few days and this should be clearer of what I am trying to do.

                I wish to simulate a crane lifting up objects. The scene has a hook mesh and the end has a physics constraint (and cable) component which constrains a cube below. Above the hook is a physics constraint actor (with cable) which constrains the hook itself. A level blueprint sets the Z-linear limit between 0 and 300 units according to time; this is how I simulate a crane lengthening or shortening the cable. The value of the limit is displayed on screen.

                In 4.18, the scene works perfectly. Spheres are spawned upon mouse clicks and the cube behaves accordingly when hit by the spheres.
                Click image for larger version

Name:	4.18.png
Views:	1
Size:	414.9 KB
ID:	1581826

                In 4.21, the hook goes haywire when linear limit is > 200 and I have no idea of what I can do.
                Click image for larger version

Name:	4.21.png
Views:	1
Size:	418.9 KB
ID:	1581827

                Comment

                Working...
                X