# Use HISM to place meshed on landscape?

**URL:** <https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994>\
**Category:** World Creation\
**Tags:** hism, landscape-grass-type, move-actor, unreal-engine, Landscape, question\
**Created:** [February 18, 2021, 4:03pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994 "2021-02-18T16:03:49Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![axios714](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axios714/32/88717_2.png) [@axios714](https://forums.unrealengine.com/u/axios714)\
**Post date:** [February 18, 2021, 4:03pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/1 "2021-02-18T16:03:49Z")

</div>

![330126-lt.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/8/048ceb32acd10e7cbcebfbcf4e724e06898d5811.png)

Hi all, I have a blueprint that is generated grass as a HISM that I want to automatically place upon a landscape, so I’m using a line trace to detect the landscape and then move the mesh there…unfortunately the whole HISM actor moves to that location, not each individual grass mesh. I am using a HISM because I need to bake in some interaction between player and grass. Please let me know what I’m missing here!

 ![330127-grass.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/9/0292801deb62261c650acfa76188087aa3ae6eb5.jpeg)

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [February 18, 2021, 5:02pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/2 "2021-02-18T17:02:37Z")

</div>

Hello! Just take a look: Add Instance is returning instance index, also you have got UpdateInstanceTransform. Just pass index from first one to last )

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [February 18, 2021, 5:22pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/3 "2021-02-18T17:22:10Z")

</div>

Hi, adding to the comment above, SetWorldLocation with the HISMC as input will move the whole component, not an individual instance. So you need to use UpdateInstanceTransfrom as described in the comment above, or directly use the correct transform when using AddInstance.

Also keep in mind that pure functions will reexecute every time you call them, so where you’re using GetRandomFloatinRangeFromStream and MakeVector afterwards, you’re using it 3 times, so you will get three different random values, _not_ the same random value three times. If you want to have the same random value, save it it to a (local) variable once and then use it those three times from that.

---

<div class="post-metadata">

**Author:** ![axios714](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axios714/32/88717_2.png) [@axios714](https://forums.unrealengine.com/u/axios714)\
**Post date:** [February 18, 2021, 6:10pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/4 "2021-02-18T18:10:25Z")

</div>

![330181-update.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/f/27f2d6bb15386a58ae09db0319d7db0672079c0c.png)

Hi thanks for the response! BPs are not my forte, so I added in the update instance transform and moved the for loop index into the instance index of update transform. Am I missing something else?

---

<div class="post-metadata">

**Author:** ![axios714](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axios714/32/88717_2.png) [@axios714](https://forums.unrealengine.com/u/axios714)\
**Post date:** [February 18, 2021, 6:13pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/5 "2021-02-18T18:13:01Z")

</div>

![330181-update.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/f/27f2d6bb15386a58ae09db0319d7db0672079c0c.png)

Yes I see now about the SetWorldLocation, I’m glad you were able to point me in the right direction. I believe I am still missing a node because I am not getting the meshes to move. I will look into the stream comment as well, for now I’m not so worried about the randomness! Thanks again!

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [February 18, 2021, 7:22pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/6 "2021-02-18T19:22:16Z")

</div>

Connect **AddInstance** output _return value_ and **UpdateInstanceTransform** input _Instance index_ - that will be correct.

---

<div class="post-metadata">

**Author:** ![axios714](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axios714/32/88717_2.png) [@axios714](https://forums.unrealengine.com/u/axios714)\
**Post date:** [February 18, 2021, 7:24pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/7 "2021-02-18T19:24:33Z")

</div>

![330190-update2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/a/91a928364eee5b5a623f9fb4926c33532371ca7a.png)

No luck so far ☹

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [February 19, 2021, 4:20pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/8 "2021-02-19T16:20:57Z")

</div>

Just have checked that on 4.23 - **AddInstance** and **UpdateInstanceTransform** work as expected. Can you check them without all this complex logic, just **AddInstance** and **UpdateInstanceTransform**? Maybe we miss something in all this linetrace logic…

---

<div class="post-metadata">

**Author:** ![axios714](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axios714/32/88717_2.png) [@axios714](https://forums.unrealengine.com/u/axios714)\
**Post date:** [February 19, 2021, 5:44pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/9 "2021-02-19T17:44:22Z")

</div>

![330264-simpler.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/8/4485a9907d941319109f6b0aeb46bacd7d64ac10.png)

Hi isn’t the point of the Linetrace to place the HISMs? How can using just add instance and updateinstancetransform move the meshes without an output from the linetreace?

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [February 19, 2021, 7:25pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/10 "2021-02-19T19:25:40Z")

</div>

> I believe I am still missing a node  
> because I am not getting the meshes to  
> move.

You have set your z-position to 0…

If you meant to use the position of the impact point of your linetrace, then you will need to plug that into the UpdateInstanceTransform (and then also check WorldSpace) and not the MakeVector in the lower left corner of your images (where you have the z-position set to 0).

---

<div class="post-metadata">

**Author:** ![axios714](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axios714/32/88717_2.png) [@axios714](https://forums.unrealengine.com/u/axios714)\
**Post date:** [February 19, 2021, 8:10pm UTC](https://forums.unrealengine.com/t/use-hism-to-place-meshed-on-landscape/478994/11 "2021-02-19T20:10:02Z")

</div>

YESSSS! That was it! I completely missed the z position at 0. Thanks so much!
