Spawning Object (emitter) with the right rotation

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

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?

Hit normal has the direction information in it

2 Likes

Sorry where do I find rotation?

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_v6c8q2oPHa
Found the solution, thanks to " Everynone " :slight_smile:

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

1 Like

Was about to type the answer.

It’s the surface that has an angle

That’s what the normal describes:

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?

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


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:

Here’s what I got:

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

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:

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

2 Likes

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? :slight_smile:

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

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:

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

How to get there:

Once you have it:


This is also a great resource:


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

It’s more than fine, you could also:

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.

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

1 Like

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!!

1 Like

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