How Do I Make Splines Visible and Shiny during Gameplay?

The effect I`d like to achieve is to present really thin shiny lines in 3D space using splines during gameplay. I understand that this should be a relatively simple question but the solution has currently eluded me.

Thanks in advance! :slight_smile:

I am adding the below part to the original question, should have specified this in the very beginning: The lines I am hoping to draw dont change their thickness no matter how far away I am from them, just like the "wires" seen in wireframe mode. A really thin cylinder or a cube can simulate such lines when you are close enough, but when your camera/viewport is far away from it it simply vanishes, which is not the desired effect. Is there any way to draw lines that dont change their thickness no matter where the camera/viewport is?

1 Like

Look into “Spline Mesh Components”. google is your friends, there’re many good tutorials on this =)

Try creating a material that shiny. Take a cube, scale it and make it long and thin and apply the material. Create a C++ class for the object (It must be some sort of actor). Create a blueprint thats a subclass. In the gamemode, in its begin play use
UWorld* World = GetWorld();

World->SpawnActor(MyBlueprint,SpawnLocation,SpawnRotation); (See documentation of UWorld for information, this what you use to spawn things in at runtime. Use createdefaultsubobject for creating objects in the constructor. Note you need need to declare the variables SpawnLocation, and SpawnRotation)

As a public variable, declare MyBlueprint as

UPROPERTY(EditDefaultsOnly, Category = MyCatagory)

TSubclassOf’<‘class MyClassBase’>’ MyBlueprint; (Without the ')

Note that you should protect your MyBlueprint pointer, and create a blueprint gamemode that is a subclass of your C++ gamemode so you can edit default subobjects. Finally, you should import the MyClassBase.h file in your gamemode C++.

as @Evigmae said. But I will try to elaborate :slight_smile:
Spline Component by itself, afaik cannot be rendered during gameplay (pls, correct me if i’m wrong)
So you need a renderable mesh that goes according to the shape of your spline.
Spline Mesh Component is supposed to do exactly this.

Here I did some google for you:


You can use a simple cylinder shaped mesh (don’t forget to add resolution where it should bend)
and at last, use you shiny material on it. :slight_smile:

Hope this helps

@AnotherZach did you reply on the right posts? lol

nup, splines are fully hidden and only meant to drive other behaviors, you can do a console command “show splines” to see them during development though.

@AnotherZach, thank you for your suggestion! Though as an amateur I don`t quite get what you mean.

At present I only know a little about using blueprints, and havent learned a single programming language. But Ill surely look into what you have suggested after mastering C++.

Thank you for taking your time to read my question and making the suggestion!

Im trying to get a VPN, the browser Im currently using doesnt seem to provide lots of useful tutorials. But Ill surely google things up as soon as I get a usable VPN.

@AyanMiru and @Evigmae, thank you very much!

This is it, thanks man