Announcement

Collapse
No announcement yet.

MSSR ★ Modular Snap System Runtime Plugin

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

    Originally posted by SeesePlusPlus View Post
    Do you have an example on how to use splines? It says you support them, and I see code in `SearchSocket` that seems to handle `SplineComponent`s, but it's not working for me. I can't seem to find an example in the provided example project.

    To provide some more details of what I'm trying to do:

    - I am spawning new actors with a mouse click and dragging them until they snap to existing actors
    - All of the actors I'm trying to snap together are blueprint actors which have a single child of type SplineComponent under the root SceneComponent. On construction, I add a simple cylinder spline mesh component
    - I was able to get the system working easily with static mesh actors, leveraging `SnapActor`, however this doesn't work by just giving it the actor of the new blueprint actor that has a child SplineComponent
    Hi, I was writing an explanation about how to use splines, then I found that at some moment I introduced a new feature that broke the spline handling, so now I'm fixing that, also adding the preview for spline meshes to the preview actor.

    Btw, how it's supposed to work: the plugin sees the endpoints of the spline as sockets. Their names are the name of the spline component plus number. For example if the spline component is called "Spline" the sockets are called "Spline_0" and "Spline_1". Then, in order to snap an actor containing the spline to something, you just need to add SplineComponent to the SourceComponents array in the snap parameters struct.

    If you want to snap to the spline endpoints, then it's a little bit more complicated. First, you need to add SplineComponent to the Target Components array of the param struct. Then the spline itself has no collision, so you need something with the collision for the plugin to see. If you have spline meshes with collision on the spline then you can use those, otherwise I spawn a simple sphere collision around each endpoint. You also need to add the component class you use for collision to the target components list.

    As a workaround you can put a static mesh with socket placed at each spline endpoint. If you can use this then it's actually faster, because spline handling is special and takes more steps.
    Modular Japanese HouseScaffold System
    Snap Plugin for EditorSnap Plugin for Games
    TwitterBlogYoutubeitch.io

    Comment


      SeesePlusPlus I fixed the bug and submitted it to the marketplace, I hope it's here soon. I also added an example with splines to the example project, you can already try the demo, I will update the source project too when the marketplace is updated.

      ps: a little video here: https://twitter.com/games_inu/status...54918552207360

      Last edited by scha; 07-05-2020, 03:11 PM.
      Modular Japanese HouseScaffold System
      Snap Plugin for EditorSnap Plugin for Games
      TwitterBlogYoutubeitch.io

      Comment


        The example project is updated too, there is a map showing how to setup splines and also how GetConnected work (when snapping stuff everybody connected is re-colored).
        Download here: https://inugames.itch.io/mssr-demos
        Modular Japanese HouseScaffold System
        Snap Plugin for EditorSnap Plugin for Games
        TwitterBlogYoutubeitch.io

        Comment


          Thanks scha for fixing this! I was able to use the demo and saw it working, but for 1 reason or another my BP wasn't working, so I went with your suggestion to use Static Meshes at the endpoints, and it works great!

          Comment


            scha Hello, i really need snapping to instance static meshes. As far as i figured out, it would work only for the first instance since unreal only gets the other socket locations by adding the relative offset from the instance to the socket location for each instance. I know it would not be a big implementation to fix this but i would not know where to add the code. Do you think you can add support for this relative socket location for instanced oder hierachial instanced static meshes to your plugin? Thanks in advance and have a good one

            Comment


              Originally posted by Mathias Wenzel View Post
              scha Hello, i really need snapping to instance static meshes. As far as i figured out, it would work only for the first instance since unreal only gets the other socket locations by adding the relative offset from the instance to the socket location for each instance. I know it would not be a big implementation to fix this but i would not know where to add the code. Do you think you can add support for this relative socket location for instanced oder hierachial instanced static meshes to your plugin? Thanks in advance and have a good one
              Hi Mathias.

              Good idea! I made a quick modification of the plugin and it seems to work. I only made "Snap to ISM" direction, but not "Snap ISMs to others" direction. I don't know if other direction is needed?
              I will send the update to the marketplace later.

              Quick test video:
              Modular Japanese HouseScaffold System
              Snap Plugin for EditorSnap Plugin for Games
              TwitterBlogYoutubeitch.io

              Comment


                Thank you that was just what we needed ! No i think the other way around does not make much sense. After we confirm the mesh to its current snapped location on the instance static mesh we just call the actor it snaps to and say that we want a new instance there or we just create a new instance static mesh (actor) all together. But perhaps someone could find use for the other way around but i haven´t think about scenarios where this might be needed. Perhaps to snap two instance static mesh groups like a house and a carport, as an example, together ?
                Anyway, you are awesome, thank you for your quick respond and fix / update!

                Comment


                  Originally posted by Mathias Wenzel View Post
                  Thank you that was just what we needed ! No i think the other way around does not make much sense. After we confirm the mesh to its current snapped location on the instance static mesh we just call the actor it snaps to and say that we want a new instance there or we just create a new instance static mesh (actor) all together. But perhaps someone could find use for the other way around but i haven´t think about scenarios where this might be needed. Perhaps to snap two instance static mesh groups like a house and a carport, as an example, together ?
                  Anyway, you are awesome, thank you for your quick respond and fix / update!
                  I finally decided to implement the other direction too, also updated the preview actor and is-connected methods. So now ISM/HISM are supported like normal SMs.
                  I will just test all this a little bit more then submit.
                  Modular Japanese HouseScaffold System
                  Snap Plugin for EditorSnap Plugin for Games
                  TwitterBlogYoutubeitch.io

                  Comment


                    So amazing, thank you so much!

                    Comment


                      Originally posted by Mathias Wenzel View Post
                      So amazing, thank you so much!
                      I tried to build and submit it but there is some weird problem between ue4.25.3 and VS2019, for some reason unreal want VS 2017 now. With 4.25.0 everything worked. I asked here
                      Modular Japanese HouseScaffold System
                      Snap Plugin for EditorSnap Plugin for Games
                      TwitterBlogYoutubeitch.io

                      Comment


                        But its released for 4.24.3 ? Thats the engine i have to work with

                        Comment


                          Originally posted by Mathias Wenzel View Post
                          But its released for 4.24.3 ? Thats the engine i have to work with
                          I found the problem, they ninja-added some new build parameters in 4.25.3 but never told it to nobody. Now I will package and submit it.
                          Modular Japanese HouseScaffold System
                          Snap Plugin for EditorSnap Plugin for Games
                          TwitterBlogYoutubeitch.io

                          Comment


                            Okay, version 1.1.3 with ISM support submitted, waiting for the marketplace approval
                            I will put the new example when the plugin is updated
                            Modular Japanese HouseScaffold System
                            Snap Plugin for EditorSnap Plugin for Games
                            TwitterBlogYoutubeitch.io

                            Comment


                              Version 1.1.3 is published, it includes ISM support. The example project and demo on itch.io are updated too, check the "ISM" map for an example of how to use it:

                              https://inugames.itch.io/mssr-demos

                              I hope everything works alright!
                              Modular Japanese HouseScaffold System
                              Snap Plugin for EditorSnap Plugin for Games
                              TwitterBlogYoutubeitch.io

                              Comment

                              Working...
                              X