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 could I project a route onto the floor of my level

I'm making a 3d tower defence game and I want to show the route the enemies will take on the floor so the player can see where to place turrets.

I want somthing similar to the line from overwatch that points the way to the objective except in this game it would trace the AI's route (They have a preset route so I don't want to do anything fancy like calculating the line with blueprints as that shouldn't be nessessary). I figure it should be possible using a spline and construction script but I don't know how to go about it.

SImply put, I need a 2d line that I can put in the level and can customise in the level editor as the level design will likely change a lot as the game progresses. I've done similar things before to lay out wires and pipes in a level but that all used meshes and I can't seem to refit the blueprints for a sprite (Which was my initial thought on how to do this)

*Edit: I am aware of the spline content examples. They however deal with meshes and I was hoping to use somthing like a sprite if that is possible.

*Edit 2: Does anyone know if Splines can be used with sprites? If so how?

Product Version: UE 4.19
more ▼

asked Mar 26 '19 at 05:20 PM in Blueprint Scripting

avatar image

12 3 5 8

avatar image ThompsonN13 Mar 27 '19 at 12:45 AM

if its something to be run during the game i wouldnt use the construction script since that only fires when a actor is created. i also dont know if i would use splines either as it may round things too much. my first thought was to use nav data and the points associated with that then create your mesh or particles, but that will depend on your nav solution i suppose. are you using a nav mesh and what kind of pathing are you using? you say its 3d but is it something like grid based movement? using the nav data has one great point going for it, its the data the enemies are actually using to move from point a to b so it should be pretty accurate.

below is a little example so you can understand what im talking about. basically all it does is find a path between two actors, then we use the points it uses for the path and we use that data to make a debug line. in a packaged game debug wont work so you would need to use a mesh or particle or something.

alt text

capture.png (282.7 kB)
avatar image Gibospartan Mar 27 '19 at 10:44 AM

I don't really want to calculate the line with blueprints. I just want a line I can drop into the editor and then drag/customise to be the shape I need, hence why i wanted to use construction script.

I might be able to use a debug line for now however, as you pointed out, that will not show up in a packaged game. I don't know how I would make a more tangable line which was why I asked the question.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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