Download

How to rotate a vector by the object's rotation [in Material]

I want to rotate a Vector by the object’s rotation inside a material.

My current concept idea:

I get the actor’s rotation from a blueprint->material parameter collection.
Convert that into degrees between 0 und 360 for each axis.

Now the part where iam stuck:

how can i rotate the vector around the object’s pivot point by given numbers?
(for example: rotate (1,1,0) around (0/0/0) by 45° around X, 0° Around Y and 270° around Z) ?

Use transform node from local to world.

Oh, didn’t know about that node’s existance, now that simpliefies that:

5b070a87517a76111bab641dae60b51cbda841a8.jpeg

into that:

ffe6df2f13f233e8e08f7b0ced8194deda4e2b6e.png

What would i do without you Jenny, thanks a lot :cool:

Use this