# Spawning Object (emitter) with the right rotation

**URL:** <https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [February 6, 2024, 8:10pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726 "2024-02-06T20:10:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 6, 2024, 8:10pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/1 "2024-02-06T20:10:38Z")

</div>

Hi, I want to spawn VFX under my charachter, I think it works fine but I don’t know how to deal with rotation. I want my VFX to “copy” the same rotation from the place where it spawns. Please take a look at my blueprints

 ![UnrealEditor_lLDQacrLSK](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/0/2608ea5be9a14935233461ebb3ea39a223f19f69.png)

Not sure if that’s the best way to achieve what i want but anyway and here is the video of my results

I want my VFX to rotate with the Mesh (Or Landscape) underneath, how would i do it?

---

<div class="post-metadata">

**Author:** ![baobao4435](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/baobao4435/32/950790_2.png) [@baobao4435](https://forums.unrealengine.com/u/baobao4435)\
**Post date:** [February 6, 2024, 8:52pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/2 "2024-02-06T20:52:18Z")

</div>

Hit normal has the direction information in it

---

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 7, 2024, 11:57am UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/3 "2024-02-07T11:57:59Z")

</div>

Sorry where do I find rotation?

 ![UnrealEditor_st1dtZDut8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/7/da73d4537bccef397f2ba93363a087ae92d54306.png)

I can see the normal, but how do i extract rotation?

I don’t think that I can do it so easily becase the mesh or the landscape it hits is not actually rotated, right? It’s the surface that has an angle

 ![UnrealEditor_C01isB0RzN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/1/6a1ce733e308caf0ce5b36eff1c9ae68046e6ce7.jpeg)

---

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 7, 2024, 12:10pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/4 "2024-02-07T12:10:32Z")

</div>

![UnrealEditor_v6c8q2oPHa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/8/bc84831f88baff020b2bace93577669c7012058b.png)  
Found the solution, thanks to " [Everynone](https://dev.epicgames.com/community/api/user_profiles/tab-redirect/about?discourse_username=Everynone) " 🙂

But I’m really interested in how it works now hehe

---

<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:** [February 7, 2024, 12:11pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/5 "2024-02-07T12:11:54Z")

</div>

Was about to type the answer.

> It’s the surface that has an angle

That’s what the normal describes:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/2/5/a25c226a9c418501104259d7a843fcdf9dac6001.jpeg)

---

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 7, 2024, 12:13pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/6 "2024-02-07T12:13:30Z")

</div>

that’s really interesting, so if I make rotation from “normal” I get the rotation of the surface, but what is the ‘normal vector’ used for?

---

<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:** [February 7, 2024, 12:35pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/7 "2024-02-07T12:35:48Z")

</div>

> [@eromanga](#):
>
> what is the ‘normal vector’ used for

A lot of things! Too many to mention, honestly.

- all the light calculation revolves around it, the angle at which light bounces of every surface you see
- physics calculation, think spheres bouncing of a wall at correct angles
- is the ramp in the pic below too steep for my character to walk on?

> if I make rotation from “normal” I get the rotation of the surface

Yes, here’s the normal - a vector that is perpendicular to the surface:

![310px-Normal_vectors_on_a_curved_surface.svg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/d/c/3dcc0204c5c997bbf6516053c5f48e6ebc4a489e.png)

* * *

But there is ambiguity in it, too - you _may_ want to include more data in the calculations.

- I want to land this helicopter down on the surface below it using just `Make Rot from Z`:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/0/0/10081a7ba8af7df3aec9fd021f8e4fc43150ec2c.jpeg)

Here’s what I got:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/0/a80436f5cb7f4564900ac74c9cf2b74f7bc0e806.jpeg)

Fine, but that changed the orientation of my craft, it was pointing more to the right before.

- if I also include the orientation of the heli:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/c/9bc2a45c4e3017a39f0bf1a9a8204170a94805c1.png)

I can now land like this, taking into consideration where the heli’s nose was first, and only then looking at the surface below to derive the final rotator:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/7/7/f775eb86c5c216aec119b46b5d30f225c63ca65c.jpeg)

If the helicopter was upside down to start with, I would need to work even harder.

---

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 7, 2024, 12:51pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/8 "2024-02-07T12:51:27Z")

</div>

wow, thank you so much for explaining normals! Why is it given in “vector form” if it is mostly used for the rotation purposes?Now I want to dig more into it and see how can I use it more in my project, don’t you know where can I read more about normals? Are there any info from Epics? 🙂

By the way, do you think this logic is okay to trace to the surface under the actor? Or is there an optimal way to do it?  
 ![brave_PX18ySzIql](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/8/eb8cf72c39c627bbc2d0e54f41eef118fb96bebe.png)

---

<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:** [February 7, 2024, 1:18pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/9 "2024-02-07T13:18:54Z")

</div>

> [@eromanga](#):
>
> Why is it given in “vector form” if it is mostly used for the rotation purposes?

Mainly used for _direction_, deriving rotators from normals is a bit of a side product. You will only need a rotator when something actually asks for it. More than often directional vectors are the way to go.

> read more about normals

This is very official, lots of math and trig:

> **[Math Hall: Unpacked | Course](https://dev.epicgames.com/community/learning/courses/4Pz/unreal-engine-math-hall-unpacked/7xvb/unreal-engine-introduction-to-the-math-hall-unpacked)**
>
> Join us in unpacking and discovering some of the great content in the Content Examples: Math Hall project! Using interactive examples we can visualize c...

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/f/b1f5abbd75391b5cb5ecfe4312fd95416d980867.jpeg)

Btw, Dot Product is the next thing to learn about once you’ve got Normals under control.

How to get there:

> **[Content Examples](https://docs.unrealengine.com/5.3/en-US/content-examples-sample-project-for-unreal-engine/)**
>
> This sample project demonstrates specific concepts and techniques to use in Unreal Engine.

Once you have it:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/f/d5f8960da1c24beafd1c29cd83e05d14097a99d3.jpeg)

* * *

This is also a great resource:

> **[Mathew Wadstein Tutorials](https://www.youtube.com/@MathewWadsteinTutorials/videos)**
>
> This channel is dedicated to exploring Unreal Engine and the Blueprint programming language that it uses. You can think of it as a companion to the API documentation as I try to cover the how and why for what things are used for when using the...

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/7/1b73417d691c0109a763a934273de3081cbe0f63.jpeg "WTF Is? Struct: Hit Result Node in Unreal Engine 4 ( UE4 )") ](https://www.youtube.com/watch?v=vje9S5aj15k)

* * *

> do you think this logic is okay to trace to the surface under the actor?

It’s more than fine, you could also:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/7/b57bfd2560bc63c6569fda7667a01af260a00125.png)

But it’s the same thing.

> Or is there an optimal way to do it?

The character is already tracing the surface they’re **walking** on.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/1/0b1bb8ab1a4fbfa28365741bf9f7810c20af30b1.png)

So you could use the existing trace already. Becomes useless when you jump, though. So stick to your own tracing.

---

<div class="post-metadata">

**Author:** ![eromanga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eromanga](https://forums.unrealengine.com/u/eromanga)\
**Post date:** [February 7, 2024, 1:24pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/10 "2024-02-07T13:24:49Z")

</div>

Could not thank you enough for all the thing u’ve done for the community! Thank you for detailed response. All the best to you!! Will dig into these links!!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 8, 2024, 1:24pm UTC](https://forums.unrealengine.com/t/spawning-object-emitter-with-the-right-rotation/1670726/11 "2024-03-08T13:24:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
