Relative Z Rotation around Impact Normal


I have spawned a bunch of instanced static meshes onto a surface and use the impact normal in order to make the instances have a correct rotation on the terrain, here a you can see an example of what I did.

As you may see the relative z rotation is always the same, this is not what I would want.

  • How can I rotate around this impact normal (relative z) before going into the Make Transform node?

I would like to randomize the rotation but all I can do is rotate the normal around the world axis which results in them pointing into the wrong direction. Instead it should rotate around the relative axis of each individual normal.

Hope someone can help?

Easy, found the solution.

You need to rotate a vector with the given rotation you want to achieve around the impact normal - make rotation result. So in my case its a random rotation on the z axis in order to rotate around the mentioned relative z:

Hope this will help someone else as well!
Gull Jemon Studios

This is actually not correct, this doesn’t give you a random rotation around the relative z axis…

So I found the solution - it was as simple as combining the two rotations:

This will work fine now!