MSS: Modular Snap System Plugin

@Glutamatkrieger Wait a sec, I will take the standard unreal cylinder and try it myself.

@Glutamatkrieger Did it:

Okay - i need to make further tests but its working now. Converting the static mesh inside the viewport to a new mesh does not transfer its simple collision that was the issue here.So yes i overlooked that. I missed it because the copied cylinder had it but didnĀ“t work and your shape mesh was converted not copied and i assumed it should have a collison on. I tried to solve this socket snapping ( even the standard one) since two days and tried too much. Sorry for that. Other than that, as i expected your plugin solves things that the standard socket snapping didnĀ“t have. So thank you for this awsome addition.
Edit : And for your fast response / help. Thanks a lot for this too !

Cool. I hope too. If you need more help or some feature donā€™t hesitate to ask:)

Btw, the reason for the collision is that the plugin does collision queries to find meshes. Without collision enabled it wont work. Itā€™s the same thing with standard UE features, like ā€œsnap to surfaceā€. If having a collision is too heavy I use some little collider primitives hidden in game. There is an example at the end of the last video, in the spline roads part.

@scha yeah i guessed from this conversation that you are using this collision query - very nice thing to have. If i had one whish i would whish to to have this shift left click thing that epic games had before in addition to your functions.If you could then also decide if it parents the object or not, that would leave no whishes open. I donĀ“t know if that would be much to do, but consider that, even if seemingly not many (i guess) had used this socket snapping feature , the one who did need either it fixed from epic or they will take yours :stuck_out_tongue: To be honest, i would buy again just for that feature but your plugin saved my time schedule even at this point so - i am just as happy now.

I can add this to the next update. I actually was thinking about it before. There is one difference I should figure how to deal with: standard editorā€™s feature is (or was) ā€œsnap one actorā€™s origin to another actorā€™s socketā€, mine is ā€œsnap socket to socketā€, you see? Itā€™s more general. But if you have a socket at the pivot point it works the same.

Also, I find simply moving actors near each other is easier that searching for a little socket. This is probably because in our project we ended up by having tons of sockets, sometimes overlapping too. But it all works painlessly because of this ā€œmatching name + angleā€ technique. But, btw, I will think about it.

I forgot to add, there is a way to attach stuff too. Itā€™s a little bit hidden. If you have an ā€œ_Aā€ suffix in the socketā€™s name and you snap one actor to it, then it will attach the moved actor to this socket. There is an example with a wall and door in the example project.

I like this plugin a lot. Simple and easy to use :slight_smile:

I did a little video about how attach to socket parameter (ā€œ_Aā€) works now.

Fixed few bugs. New v.1.3.2 is now on the marketplace.

I am getting some crashes lately since installilng UE 4.20. Here is the crash dump

Access violation - code c0000005 (first/second chance not available)

UE4Editor_Engine!HHitProxy::IsA() [d:\build++ue4\sync\engine\source\runtime\engine\private\hitproxies.cpp:113]
UE4Editor_SnapSystem!FMSSModeEdMode::HandleClick() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\snapsystem\source\snapsystem\private\mssmodeedmode.cpp:291]
UE4Editor_UnrealEd!FEditorModeTools::HandleClick() [d:\build++ue4\sync\engine\source\editor\unrealed\private\editormodemanager.cpp:664]
UE4Editor_UnrealEd!FLevelEditorViewportClient::ProcessClick() [d:\build++ue4\sync\engine\source\editor\unrealed\private\leveleditorviewport.cpp:1951]
UE4Editor_UnrealEd!FEditorViewportClient::ProcessClickInViewport() [d:\build++ue4\sync\engine\source\editor\unrealed\private\editorviewportclient.cpp:2824]
UE4Editor_UnrealEd!FEditorViewportClient::InputKey() [d:\build++ue4\sync\engine\source\editor\unrealed\private\editorviewportclient.cpp:2586]
UE4Editor_UnrealEd!FLevelEditorViewportClient::InputKey() [d:\build++ue4\sync\engine\source\editor\unrealed\private\leveleditorviewport.cpp:2597]
UE4Editor_Engine!FSceneViewport::OnMouseButtonUp() [d:\build++ue4\sync\engine\source\runtime\engine\private\slate\sceneviewport.cpp:593]
UE4Editor_Slate!SViewport::OnMouseButtonUp() [d:\build++ue4\sync\engine\source\runtime\slate\private\widgets\sviewport.cpp:202]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_1002768c627006711ef2f351a87ec0e7> >() [d:\build++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:268]
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() [d:\build++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5472]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() [d:\build++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5979]
UE4Editor_Slate!FSlateApplication::OnMouseUp() [d:\build++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5959]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessDeferredMessage() [d:\build++ue4\sync\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp:1736]
UE4Editor_ApplicationCore!FWindowsApplication::DeferMessage() [d:\build++ue4\sync\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp:2182]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessMessage() [d:\build++ue4\sync\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp:895]
UE4Editor_ApplicationCore!FWindowsApplication::AppWndProc() [d:\build++ue4\sync\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp:732]
user32
user32
UE4Editor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [d:\build++ue4\sync\engine\source\runtime\applicationcore\private\windows\windowsplatformapplicationmisc.cpp:129]
UE4Editor!FEngineLoop::Tick() [d:\build++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3417]
UE4Editor!GuardedMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:144]
UE4Editor!WinMain() [d:\build++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:223]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]

nt

Iā€™ll check that out.

@Wallenstein I fixed it, I think. Can you tell me what do you click on when it happens, so I can test before submitting the fix?

Dang, I wish I knew. It happened only twice today. I had some box object placed in a level that had snap sockets and then was doing something else, but I canā€™t remember what it was, sorry :frowning: . If it happens again for me, I will pay more attention and post here

This time I moved a concrete slab around that used snap sockets and then right clicked in the scene somewhere else while I was in the geometry editor. I was trying to create a geometry brush with the EDIT functionality and right clicked in the viewport, not sure whether on an object or on an empty space with o object other than the skysphere deep down.

Yep, Ok so it is an open world scene and I load the persistent level. It has a few technical things like lights etc in it. I right click in the viewport without dragging it, waiting for the context menu, instead the crash happens. When I click on the Snap icon to turn snapping off, no crash happens. When I right click and drag the viewport around, no crash either. I removed all items from the persistent level with the same result.
It does not seem to happen in the simple startup world that is loaded on editor startup. What it has to do with the loaded world, i can not say, but it is clear that the cause for the crash is RMB down-up without moving the mouse.
EDIT: You have to be in TOP view mode for this, perspective will not crash

EDIT: I had another crash. Was dragging a bunch of objects with snap sockets around, then left clicked outside of the selected objects in the viewport. A dot appeared and crash. Before the crash, the snap did not work either although it was turned on, the dragged objects (I was trying to extend a city wall by copying segments) would not snap to the existing ones

@Wallenstein Thank, you! Itā€™s fixed. I submit the fix tonight and it should be there tomorrow or so (depends of epic). It will be v1.3.3

edit: Submitted.

Thanks alot, that was quick work!

It seems itā€™s already released. That was quick! Thanks Epic :slight_smile:

I tested it and had no crashes anymore. Thank you