I finally managed to make the clean detach of physics actors. It took much more time then expected. There is a bug in UE I think that makes things difficult.
I will add that to the example project and to the VR project so people can try to break it
It’s released!
https://www.unrealengine.com/marketplace/en-US/slug/modular-snap-system-runtime
There was some (many) problems with the Marketplace, but finally it seems everything works.
I found some bugs in the tutorial project right now, some light settings went wrong for some reason.I’ll fix that tomorrow.
Also the improved VR example with correct detach is ready, also will be published tomorrow on itch.
If you have any questions or anything I will be here tomorrow.
Below screenshot with bugs when I’m trying compile to package from Your MSSR Example Project.
When debugging (press “play” in editor) everything works ok.
Any idea what it can be or what I do wrong?
It seems I forgot to add those categories, sorry! I will fix that and reupload later.
For some reason it compiles and passes all marketplace tests.
Quick fix: just add “Category = Something” in every of those lines, so for example
UPROPERTY(EditAnywhere, BlueprintReadWrite)
should become
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Something)
then it should compile.
Thanks for advices. Now, bugs from MSSRBPLibrary.h was gone.
Anyway, still can’t compile MSSR Example Project (see picture below).
Tried compile as shipping, as development (build configuration).
Tried compile MSSR Simple Level, tried compile MSSR_ContentExamples and situations is still the same.
How I can solve this ?
VS too old for UE4.22?
I see “error C2338: Visual Studio 2017 versions 15.7 and 15.8 are known to have code generation bugs that affect UE4. Please update to version 15.9.”
Updated MSSRVR_Project.zip and MSSRExample_Project.zip files on itchio. Content example level had some lighting bugs, plus there is a new demo map to show the complex detach algorithm.
There is also a new VR demo: MSSRVRv2. It’s still the default VR template with snapping, plus the new detach algorithm. The MSSRVR_Project.zip contains both of the maps.
If you have a VR please check it out and tell me if it works, I can only test with kb+m which makes things difficult.
The new detach basically works like that: when you have many cubes weld together and you detach one of them, it will break the connections between this cube and the others but still preserve other connections. There is 2 cases. If your structure is lying on the ground it will detach one cube an let the rest fall down, but not break other connections. If you hold your structure in one hand and detach with the other it will try to split it in 2 parts, making sure nothing falls on the ground. That’s how it supposed to work.
If someone with VR can make some videos that would be great, just post them here. In general, if you make something with the plugin please don’t hesitate to post! I really want to see it
@ oh yes! I completely forgot update Visual Studio from 2017 to 2019 version.
Yesterday, when I saw the MSSR Plugin in the marketplace, quickly installed 4.22 and did not even think about Visual Studio 2019
Of course, You were right. With the new Visual Studio, everything compiles perfectly.
Thank U
Great!
I already submitted the update for the “category” bug, it will be v1.0.1! I also couldn’t compile the VR example myself. I don’t understand how it pass the Marketplace quality control.
If you do something cool post it here pls
Okay, v1.0.1 is online, the bug @PiotrC encountered should be gone.
Uploaded playable multiplayer demo MSSRNet to itchio, download here: MSSR Examples by Inu Games
Run Server.bat then Client.bat, edit Client.bat to change server’s IP, F11 to toggle fullscreen.
Pawn and map are included in MSSRExample_Project.zip.
Great news, thanks, I was already waiting to add it to my building system
Super short “tutorial”: how to make a builder pawn in 45s
The plugin is finally published, so I can do new stuff
WIP: playing with multi-threading. New BP node called SnapActorsAsync, which is like SnapActors, but running on a separate thread.
It’s a latent node, like Delay, which means it can take multiple frames to complete, but it will not take your FPS down (which is especially cool for VR i suppose)
Here an example where this node is used to calculate the preview. We try to snap about 100 cubes, which means about 600 traces per search operation.
First, the synchronous approach is used, then the asynchronous (multi threaded) one.
Observe the graph in the lower left corner of the screen, the red line represents the game thread time per frame.
Video:
Play in fullscreen to see the graph better
I forgot to add something to “VR version 2” example project zip files on itchio, so it didn’t work. I uploaded the fixed version now, MSSRVRv2.zip and MSSRVR_Project.zip
If somebody could test it, that would be very awesome.
Version 1.1.0 submitted, including the new experimental multi-threaded snap operation (async snap) and the options in the preview actor that enables it.
Also includes a new preview material that hides the inside faces.
I will update the example project when it’s released. Here is the video from the new demo level:
In the video, 130 colored cubes, 6 sockets each, are attached together. To calculate the preview 780 traces (and other calculations) are needed.
You can enable stats (fps, unit graph etc.) and move the structure over the metal cubes in the back to see the preview.
You press X to toggle between Async(runs on separate thread) and Normal (runs on the game thread) preview and observe the difference it makes on the FPS. You can check the red graph which corresponds to the game thread time and the fps number on the right too.
The example might seem pretty extreme at first sight, but if you need to move and snap compound objects, like whole houses, and you need the FPS too, like in VR, that can be very useful.
At the end the new material is shown too. The material, in my experience, don’t affect the performance too much in either way, It’s just may be more convenient to see the preview this way.
Looks like the new version is out. I updated the examples zip on itchio with a new map MSSR_Async, the same as in the video below.
https://youtube.com/watch?v=qLzLuH8fybI](MSSR Examples by Inu Games)
Hi @,
Still working progress at my own project using MSSR (plugin is wonderful - with a clear conscience recomend everybody).
I have little issue with “scale”.
In my project (building system) using 10 or 11 element. When I’m puting objects in orginal scale everything snapping well.
After rescale in the runtime one of my element - and next putting into the scene other element and trying to snap - new element gets deform by scale object what I modyfed before.
Where is the problem?
Hi @PiotrC
The scale is weird. It’s always in local space, so the result depends on how the object you are scaling is rotated in the world. I made a little video to show the problem. It’s not really plugin related, it’s how it works in UE in general.
If you can disable the scale snap by setting the scale snap parametes to 0, it will not scale at all. You can do it in snap parameters struct or per socket by adding _SX0, _SY0, _SZ0 to the socket name (it’s explained in the last stand of the tutorial project)
Or, you need to make sure you always use uniform scale, always scale in 3 directions in the same time. Or else, you need to make sure you only attach things in some meaningful way, so they never apply the incorrect scale, but this depends on what you are doing
Hey @
OK, everything working as should
Change sockets names don’t give me expected results, but after looked closer to Your blueprints from Example Projects, and little improved my character, scale in any axis after rotate, works really pretty with great snapping.
Thanks.