Can't Connect Material Collection Param to Cross Product Node

Hi everyone,

I have a Blueprint set up to curve left/right and up/down depending on the RGB values set in the material.

I need to edit these values in real time during the game. It looks like Material Parameter Collection is the best way to do this BUT I can’t plug the Collection Parameter node into the Cross Product node if it’s a Vector.

I originally had the parameter ‘Curvature’ connected which as you can see in the screenshot is a Vector Parameter as I’m confused as to why the Vector Collection Parameter won’t work.

Is there another node I can plug into or go through to get these to connect?

Or can I use an extra Collection Parameter to split the RGB channels and then somehow hook them back up using another Collection Parameter?

Thanks!

Dear Valkyrie_Sound,

the problem is that you are trying to connect a float4 to a float3.

CameraDirectionVector is a float3

Curvature from your MPC is a float4.

Unreal actually allows to do a Cross between a float3 and a float4, but the result is a float4, and then you want to use the result into an operation that requires a float3.

You just need to mask (BitMask Node) your vector from the MPC, as shown in the picture below:

Alternatively, if you still want to do the cross and obtaining a float4, then you can do the mask after the Cross node.

If it is not clear, comment below and I will answer your doubts.

Thank you so much!

Of course, now it makes sense that the camera and world position would be based on 3 values, xyz. And of course, now it also makes sense that the MPC has a fourth number, the Alpha.

So easy now!

Thank you :slight_smile:

Can you show me a picture of your Material?
I’ve reproduced your material on my end and with the Curvature on the MPC set to 0 there is no visible effect on my cube mesh.
Also, I am not 100% sure which is the effect you are trying to reproduce. Could you provide more details?

sdasgfgfdjhgsjuhfujdgsuiguidasgdiwt7478tygcyuagczvgyuagh aushfaushfga//&cgvicohioshe895
safsgdfhgfjh//ggoptret//jgbhdsugfhighadfygyj gxyh fb uafbgjhbf jg i gfiusag fusdgftoishgfdsfuigeyfauigd suifhiosah oida hoih ois dhoih oishoifhiofh ois hdsiovh iduhax iuhiufh iduafh ius heop1hoiu3h5iofhdoithvouifhoi