# How to scale mesh to the impact point range

**URL:** <https://forums.unrealengine.com/t/how-to-scale-mesh-to-the-impact-point-range/1267420>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [August 21, 2023, 7:03am UTC](https://forums.unrealengine.com/t/how-to-scale-mesh-to-the-impact-point-range/1267420 "2023-08-21T07:03:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pasunna\_Zacrifa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pasunna\_Zacrifa](https://forums.unrealengine.com/u/Pasunna_Zacrifa)\
**Post date:** [August 21, 2023, 7:03am UTC](https://forums.unrealengine.com/t/how-to-scale-mesh-to-the-impact-point-range/1267420/1 "2023-08-21T07:03:11Z")

</div>

I want to make a laser beam from static mesh  
I know there are beam that look like paper in particle system  
but I want the beam to look solid from other angle too so I choose to make it by tube mesh  
problem is I don’t know how to make the mesh lenght scale to match the length from start to impact point  
Don’t know how to calculate and setting this  
like first cal my mesh length then scale it to match the trace length  
any suggestion?  
thank you

---

<div class="post-metadata">

**Author:** ![AliRizvi72](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AliRizvi72](https://forums.unrealengine.com/u/AliRizvi72)\
**Post date:** [August 21, 2023, 7:26am UTC](https://forums.unrealengine.com/t/how-to-scale-mesh-to-the-impact-point-range/1267420/2 "2023-08-21T07:26:06Z")

</div>

you can calculate these by simply using line trace and there’s hit location too. calculate distance using line trace start point and hit point

---

<div class="post-metadata">

**Author:** ![Pasunna\_Zacrifa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pasunna\_Zacrifa](https://forums.unrealengine.com/u/Pasunna_Zacrifa)\
**Post date:** [August 21, 2023, 8:15am UTC](https://forums.unrealengine.com/t/how-to-scale-mesh-to-the-impact-point-range/1267420/3 "2023-08-21T08:15:44Z")

</div>

thanks I know that part  
but I don’t know how to match it size  
the scaling is done by multiply_1_2/_0.5_0.75 etc(or maybe I misunderstand it)  
what node to calculate my model size and the scale number to match the range

I’m not sure if this more clear than above  
How to do scaling of static mesh to match distance range?  
I want to create laser beam use static mesh to get the solid look  
but I don’t Know how to calculate the scaling parameter of the mesh to match the distance I get  
like every mesh have it own xyz size but scale is 1.0/1.0/1.0  
how do I know what multiply to match with distance value

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 21, 2023, 1:21pm UTC](https://forums.unrealengine.com/t/how-to-scale-mesh-to-the-impact-point-range/1267420/4 "2023-08-21T13:21:19Z")

</div>

> [@Pasunna\_Zacrifa](#):
>
> but I want the beam to look solid from other angle too so I choose to make it by tube mesh

Beam particles - ribbon renderer - allows you to use any mesh:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/3/de36e2ca0b1cecd4c59e573febc4168797caa450.png)

So you can make it out of _teapot_ meshes if you fancy.

* * *

Scaling a static mesh for this would be awkward at best, iffy. At least consider a spline mesh component; you can add collision if needed and no calculations are really necessary. It’s also quite flexible:

> [@Connect mesh between two world vectors at runtime?](https://forums.unrealengine.com/t/connect-mesh-between-two-world-vectors-at-runtime/213028/2):
>
> Spline mesh component can deform meshes. Or are you actively trying to avoid using a spline? As in: This is using a cube as the beam mesh, scaled down. Would that work?

* * *

However, you do what you need to do, ofc. Perhaps a static mesh would work better in your case, indeed.

- providing this is `the tube` (it’s the engine default cylinder @ 100x100x100 uus):

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/5/6b586db909f22459c14934b1d197a2a5c565b033.jpeg)

- you could try:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/a/73abf891119099856825869262cf6eb0d77256ed.png)

- resulting in:

Hope it helps.

* * *

> make a laser beam

Do note that in-game the Niagara ones will look & perform better than most (all?) other methods. IMHO, at least; especially when you’re after something more subtle:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/c/23c35582a144a20827b107212ed0f996b05abd56.jpeg)

---

<div class="post-metadata">

**Author:** ![Pasunna\_Zacrifa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pasunna\_Zacrifa](https://forums.unrealengine.com/u/Pasunna_Zacrifa)\
**Post date:** [August 21, 2023, 1:54pm UTC](https://forums.unrealengine.com/t/how-to-scale-mesh-to-the-impact-point-range/1267420/5 "2023-08-21T13:54:13Z")

</div>

thanks, I try the beam tube but not quite get the solid look to me  
I will try to match the distance by mesh scale in Niagara  
the x0.01 for 1 meter is what I’m looking for
