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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to: Get random rotation on all meshes in Hierarchical Instanced static meshes?

Hey Everyone!

So before I begin, I'm very much a newbie in terms of using UE4, so forgive me if this question seems ridiculous!

However, I've recently been working on a project and was wondering if anyone could help me out. I've created a Blueprint which utilises hierarchical instancing for a static mesh.

I was wondering how I could rotate the X (Roll) and Z (Yaw) randomly for each created instance?

Here's my current BP for those wondering - it's all being done in the construction script.

Thanks everyone for the help, I really appreciate it!!

[1]: /storage/temp/252725-bp-instancingerror.png

Product Version: UE 4.19
more ▼

asked Sep 04 '18 at 07:25 PM in Blueprint Scripting

avatar image

6 2

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

2 answers: sort voted first
more ▼

answered Sep 05 '18 at 07:40 AM

avatar image

4.3k 80 17 104

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

So you can do it by changing the mesh transform of each instance. I managed to do it like this. Not sure how performant it will be running this off tick for a large asteroid field but it works. One little bug I noticed is that you MUST change the world location by at least 1 unit in any direction for the rotation to work. Otherwise nothing updates, not sure why that is but that is what that extra vector addition is for in my screen shot.alt text

more ▼

answered Jan 14 '19 at 03:34 PM

avatar image

Nebula Games Inc
5.4k 28 9 14

(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