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"

Add static mesh instance to specific scene

Hi,

I'm trying to generate a function to make a wall. The idea is that i will give number of segments, world location and direction. The wall is then built with pillars and wall sections.

My function builds the wall at 0,0,0, in the +ve X direction (using many 'Add Instance' on static meshes) then moves it to the location to the one given in when it's called and rotates it (using Set Relative Rotation and Direction).

I intended to call this function many times, but every time i do, all walls (the current and previous one) are rotated and positioned to the last rotation and position.

It seems that every time i add instance in my blueprint, it adds to the default scene and when i rotate, i'm doing this to the whole scene.

So, I've been trying to create a new scene within the blueprint every time i call the function. Set default scene to point at that, then add the instances, then set the rotation and position of the default.

This isnt working. Does this sound like a mad technique - if so, can anyone offer a different way of doing it ?

( i want to build in location 0,0,0 and then rotate the whole wall, because i'm trying to avoid the trig/maths of positioning every single wall element)

Product Version: UE 4.12
Tags:
more ▼

asked Sep 10 '16 at 08:51 PM in Blueprint Scripting

avatar image

xykevinr
3 1 2

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

1 answer: sort voted first

This has been done and is available in the content examples project from Epic. It is the fence inside the Blueprints Advanced level. Just replace the mesh and off you go!

Hope it helps.

more ▼

answered Sep 10 '16 at 08:59 PM

avatar image

NoobsDeSroobs
2.7k 107 35 180

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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