's Vertex Snap Editor Plugin, Download for You!

UE4 Updated

I have updated my Vertex Snap Editor Plugin for UE4!

See below for very big description!


**[Vertex Snap Editor Plugin Wiki Page](https://wiki.unrealengine.com/%27s_Vertex_Snap_Editor_Plugin)**

https://wiki.unrealengine.com/%27s_Vertex_Snap_Editor_Plugin

Entire C++ Source Included

I’ve included my entire Editor Plugin source code for you to use as a reference for

  1. making plugins
  2. making editor feature plugins
  3. making a vertex snap feature

Enjoy!


Pictures

https://www.mediafire.com/convkey/a42b/3mi5mk8xyb9yc3r6g.jpg



https://www.mediafire.com/convkey/a30d/jbwgbrb4elmqmdt6g.jpg



https://www.mediafire.com/convkey/ab96/bh7ljaa6idorq3s6g.jpg

Download

The download is on the wiki page!

Direct Download
Plugin download (~12MB)


**'s Vertex Snap Editor Plugin**

**Newest Editor Feature: Drop Static Meshes to Nearest Surface!**

**Now you can just press the Y key in the UE4 Editor** 

to drop the selected Static Mesh or Static Meshes to the nearest surface in the level!


You can drop Static Meshes down to each other too!

My algorithm takes into account the actual shape of the static mesh being dropped, as well as the landscape/level/meshes it is being dropped onto!

**If you have multiple objects selected**, they are treated as one big object and all the surfaces are calculated together, and the group is dropped, maintaining formation, to the nearest surface within your level.



UE4 Editor Plugin, No Code Compile Required


Dear Community,

This is my very first **new Editor Mode** for the main UE4 Editor!

This is a tiny ( under 15 MB ) plugin, that you can download and use without having to compile any source code.

Your project *does not* have to be a code-based project!

**It adds 3 new features**

1. Toggle instantly moving selected static meshes to the mouse cursor, to quickly move them around, or "teleport" them across the map, supports Multi Selection.


2. Press K to reset a static mesh actor's rotation


3. Vertex Snapping! Optionally snap to surface normal of destination static mesh

    -verticies can be resized anytime using + or -
    -you can cycle among 5 different verticies display options at any time 
    -you can toggle vertex displaying by pressing Y.


All of the features are related to static mesh actors and my editor mode disables itself if you are not working with a static mesh actor.

It is super easy to enable or disable my editor mode, or suspend it entirely after trying it out.


**[FONT=Comic Sans MS]With my editor mode plugin you can enjoy some new features for your UE4 Editor Experience!**

~~~

**C++ Source For You**

I am including my entire source code for how I

1. made an UnrealEdEngine class as alternative editor class
2. made an additional FEdMode for custom editor modes, you could make your own too!
3. my actual editor mode source code, so you can see exactly how I did all of it
4. My Blueprint Library nodes as usual
5. How all of this gets wrapped into a Plugin so that anyone can use it without compiling any Source Code, literally Plug and Play 

**Credits:**
	
Feel free to use my C++ code as an outline for making your own Editor Mode Plugin!

Just please give me credit somewhere appropriate.

I did not use any algorithms or math equations from any source, 

I wrote all the code myself and just used Epic's awesome .h Rocket source files as a reference

~~~

**Installation**

**Download**
[Plugin download (13.57MB)](https://d26ilriwvtzlb.cloudfront.net/f/fb/PLUGIN_VictoryBPLibrary.zip)


It is important to do all of these steps in order

1. download my editor / BP plugin and put in a directory directly off of your main project directory called "**Plugins**"

spelling must be exact 

2. Load UE4 editor and go to Windows->Plugins

3. Find my plugin and make sure it is checked as being active

4. maybe double check #3

5. close the editor.

6. go to YourProject/Config/DefaultEngine.ini

7. add these lines:


```


[/Script/Engine.Engine]
UnrealEdEngine=/Script/VictoryEdEngine.VictoryEdEngine


```


	
8. Load UE4 Editor again

9. click on any static mesh actor 

10. You should now see the Victory Editor HotKeys button in the top left

11. If you hover mouse over this title area any time, you can get the list of hotkeys

12. Enjoooy!

**What does this all do?**

My plugin includes an alternative UnrealEdEngine class, that makes use of my new additional FEdMode editor mode class.

The config file tells the main UE4 binary to use my alternative UnrealEdEngine class instead of the default.

Commenting out the line you added will instantly disable my Editor Mode.

Unchecking my plugin in Windows->Plugins within the editor, but leaving the config file set,

is pretty much guaranteed to cause a crash.

soooo

~~~

**Disabling My Editor Mode / Entire Plugin**

To disable my editor mode you should *always* comment out the DefaultEngine.ini line first!

Then you can load the editor again and disable the plugin entirely


My plugin cannot corrupt or damage your main UE4 install in any way,


If you get a crash dont panic, just read these steps again 



~~~

**" Help I can't Load Rocket Anymore "**

The worst that can happen is that the config file gets setup up wrong, 

and you wont be able to load the editor, 

and it will crash if you try cause it can't find the new Engine class.


**But, this is extremely easy to fix!**


just comment out the line that you added in your config file and you are guaranteed good-to-go




```


[/Script/Engine.Engine]
;UnrealEdEngine=/Script/VictoryEdEngine.VictoryEdEngine


```



Victory Editor Align Mode

Features:

1. Instant Mouse Move of Static Mesh Actor
-Press T key to toggle this mode! (mapping it to a mouse button proved too complicated given all existing editor mouse button functionality)

-The selected Static Mesh(es) will move instantly to follow the mouse cursor anywhere in the XY plane, staying on the current Z 

-This can be used to instantly move objects to a location by
	a. selecting them all
	b. moving to your desired destination location
	c. press T key and they will all warp to your current location 

-Supports multi-selection

2. Reset any Static Mesh Actor’s rotation to 0
-Press the K key
-just a handy little feature,
-extra-useful if the vertex Snap-By-Surface-Normal goes wonky

3. Vertx Display and Snapping
-Press Y key to toggle displaying of static mesh verticies!
-Press B to toggled between five different display types for all verticies
a. simple crosshair
b. solid rectangle
c. 3D box
d. diamond (pretty good even at 4000 verticies)
e. sphere (slow for > 3000 verticies)

-Hold SHIFT while selecting the second vertex to use Snap-By-Surface-Normal, which will try to align the source static mesh actor with the surface of the destination actor.

-snap selected static mesh actor by chosen vertex to the chosen vertex of another static mesh actor,

-can do whole process with 3 input key presses total!

**Have Fun**

Have fun with my editor mode!

Happy to say Thanks! It works! :smiley:

Yay!

Glad to hear it!

Congrats on your first post!

:slight_smile:

Just wanted to say thank you , you are a real asset to this community with your contributions so far. Keep up the great work :slight_smile:

Thanks ,

Just so you know guys when he say;

  1. Find my plugin and make sure it is checked off as being active

He means put active ON.

^^

Yaay!

Hahaha okay I will go rephrase that :slight_smile:

Cool work . Got a question for you:

Do all plugins, generally, need to do that? Like suppose I want to install more plugins that create their own instances/versions of the editor (if I understand correctly), will that create issues?

You only need one EdEngine class

For many plugins of different purposes you make different EdModes

that is the easy and ready-to-go way that our awesome friends at Epic have engineered the editor to be easily expandable in functionality

:slight_smile:

so there are two classes

EdEngine

EdMode

you want the latter

EdEngine drives how they all work together.

Hi, I just tested it out and it works gear!
I have a question though, does this work for building within the blueprints editor? I really would need that since snapping to grid doesn’t work in there.

Thanks you!

Ok, so lets say I have your plugin and another one, the ini should look like this:


[/Script/Engine.Engine]
UnrealEdEngine=/Script/VictoryBPLibrary.VictoryEdEngine
UnrealEdEngine=/Script/whatever.blabla

Won’t that confuse the engine? Or am I missing something here?

Bump for new comers and wow there’s a lot of them!

Bump,

I am giving you the entire source code for how to make plugins, as well as UE4 Editor Plugins to add new features to the editor!

Enjoy!

darling, could you consider making a ‘light’ version of it that works the same way the vertex snapping in unity works?

Pressing V shows a square around each visible vertex of the selected mesh
While you keep pressing V, click on the desired vertex and move your mouse over a desired location.
While you move the mouse the mesh snaps to the vertex under it, release V and the mouse button when happy with the position.

Nothing beats the simplicity and power of that and I don’t understand why Unreal doesn’t have this?

I’ve tried your plugin but to be honest for me it feels extremely uncomfortable up to a point I sadly prefer to move stuff manually :frowning:

I’m currently recreating a level from Unity to UE4 blocks per blocks and I can assure you I’m crying for a simple snapper like Unity and maya has ><

Here’s a picture of only a small part of the level;

http://puu.sh/7K8dw.jpg

I would be eternally grateful if you could make this happen !

Hey , how did you get the normal of a surface?

I ctrl+F’d through the code but I couldn’t find anything glaringly obvious. Is it a property you can access directly?

Traces
https://wiki.unrealengine.com/Trace_Functions_For_You

when you do traces

the normal is part of the returned FHitInfo

HitInfo.ImpactNormal

:slight_smile:

That’s a very nice level you have there!

Depending on what you are asking, it might be a 5 minute thing for me to add what you are requesting

let me confirm

“While you keep pressing V, click on the desired vertex and move your mouse over a desired location.
While you move the mouse the mesh snaps to the vertex under it, release V and the mouse button when happy with the position.”

So you’re saying that

when you hold down V, you can then select vertices.

And once you’ve selected a vertex, while still holding V,

that vertex will now snap to the cursor position, and follow the cursor around the world?

What about Z axis?

Does the mesh stay on whatever Z level it was on, and follow cursor in XY plane only?

PS: a VIDEO by you would make this much easier for me

I thought it might have been that line. Thanks for the link, and the entire article as well!

Thank you for your nice comment and for considering the proposition!

When you hold V the vertex of the selected mesh close to your mouse shows a box, if you release V that box vanishes. Instead of clogging the whole interface with a lot of boxes (one per vertex) they only show one, pretty neat actually.
When you found the one you want you can then drag it and while you move it that vertex will snap to the closest vertex under the mouse, so you have a real time preview of the position where you drop it.

Conserning the Z axis it will still snap on vertices hidden behind the pointed mesh. In Unity it sometimes snaps very far but the real time preview avoid this being an issue, just move the mouse a bit untill you have what you want.

Here’s a gif that shows exactly how it behaves, its very clean and convenient as you can see.

This should be by default in UE imho, I wouldn’t be surprised to see this feature implemented in the real build down the road because unity and maya users are going to ask for it a lot and unless snaping meshes at floating point coordinates causes some performance drop there’s no reason to leave this as a plugin forever no?

http://s24.postimg.org/pzgtwguph/snap_U.gif

gif explains everything, great!

Yea I can do this

there’s currently a U key to toggle vertex visibility,

I will add an additional mode of “only show nearest vertex”

(I personally enjoy seeing all the vertices)


Then actually implementing the feature itself you want should be about a 5 min effort given my current code.

Currently handling some other matters,

 will post in this thread when the new download is ready