Announcement

Collapse
No announcement yet.

Change collisions in ConstructionScript

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

    Change collisions in ConstructionScript

    Hi all!

    I want to change collision state in depending on blueprint variable. Bu this code doesn't work. Changing a variable "EnablePhysics" in an actor is completely ignored.

    Click image for larger version

Name:	Image_002.png
Views:	141
Size:	74.0 KB
ID:	1692397

    And i don't understand why. By the way, collisions for sphere are full disabled, so they don't affect to this code.
    I hope you can help me understand the error. Thanks in advance!
    [GAME] The Unexpected Quest | [TOOL] Localization UE4

    #2
    mdeni You're using the wrong node, you need SetCollisionEnabled.

    Comment


      #3
      Originally posted by ClockworkOcean View Post
      mdeni You're using the wrong node, you need SetCollisionEnabled.
      This node (SetCollisionEnabled) doesn't work like the first.
      [GAME] The Unexpected Quest | [TOOL] Localization UE4

      Comment


        #4
        mdeni All your doing with the first node is toggling between the box collision ( as you have set it in the details ) and none. That's best done with SetCollisionEnabled.

        Comment


          #5
          Originally posted by ClockworkOcean View Post
          mdeni All your doing with the first node is toggling between the box collision ( as you have set it in the details ) and none. That's best done with SetCollisionEnabled.
          Sorry for my English, it is not my native language. Perhaps I made the wrong point. I mean, that SetCollisionEnabled does not work. As and first variant. Of course I tried it too.
          [GAME] The Unexpected Quest | [TOOL] Localization UE4

          Comment


            #6
            mdeni Yes, maybe we have our wires crossed here. What I mean is


            1) Set the box to block all dynamic in the details

            2) Use the set collision enabled node to run that off and on.

            Comment


              #7
              Originally posted by ClockworkOcean View Post
              mdeni Yes, maybe we have our wires crossed here. What I mean is


              1) Set the box to block all dynamic in the details

              2) Use the set collision enabled node to run that off and on.
              Yep. This is not working.

              Click image for larger version  Name:	Image_001.png Views:	0 Size:	95.7 KB ID:	1692821

              Paste this Actor on any level. And in Details panel try to switch 3-4 times "Enable Physics". After the second switch, the physics stops changing.
              Last edited by mdeni; 11-30-2019, 12:57 PM.
              [GAME] The Unexpected Quest | [TOOL] Localization UE4

              Comment


                #8
                mdeni I mean like this:

                Click image for larger version

Name:	phy.JPG
Views:	120
Size:	83.8 KB
ID:	1692833

                Comment


                  #9
                  Originally posted by ClockworkOcean View Post
                  mdeni I mean like this:

                  Click image for larger version

Name:	phy.JPG
Views:	120
Size:	83.8 KB
ID:	1692833
                  There is no difference in your code and mine.
                  [GAME] The Unexpected Quest | [TOOL] Localization UE4

                  Comment


                    #10
                    mdeni Well, there is. I don't know how well that switch on bool is working.

                    Comment


                      #11
                      Well, that was a bug in the engine. Don't forget to vote!
                      https://issues.unrealengine.com/issue/UE-85449
                      [GAME] The Unexpected Quest | [TOOL] Localization UE4

                      Comment

                      Working...
                      X