x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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! :)

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 don`t 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 don`t change their thickness no matter where the camera/viewport is?

Product Version: UE 4.21
Tags:
more ▼

asked Nov 26 '18 at 10:57 AM in Blueprint Scripting

avatar image

ANoobyBird
41 3 3 7

avatar image Evigmae Nov 26 '18 at 08:49 PM

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

avatar image ANoobyBird Nov 27 '18 at 08:41 AM

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 doesn`t seem to provide lots of useful tutorials. But I`ll surely google things up as soon as I get a usable VPN.

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

as @Evigmae said. But I will try to elaborate :) 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: https://www.youtube.com/watch?v=eKIiWa19EMI

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. :)

Hope this helps

more ▼

answered Nov 27 '18 at 02:29 AM

avatar image

AyanMiru
308 2 5 10

avatar image Evigmae Nov 27 '18 at 03:05 AM

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.

avatar image Two-faced Dec 15 '18 at 11:16 AM

This is it, thanks man

avatar image ANoobyBird Nov 27 '18 at 08:44 AM

@AyanMiru and @Evigmae, thank you very much!

(comments are locked)
10|2000 characters needed characters left

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++.

more ▼

answered Nov 26 '18 at 11:09 PM

avatar image

AnotherZach
45 1 3 5

avatar image Evigmae Nov 27 '18 at 03:00 AM

@AnotherZach did you reply on the right posts? lol

avatar image ANoobyBird Nov 27 '18 at 08:36 AM

@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 haven`t learned a single programming language. But I`ll surely look into what you have suggested after mastering C++.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question