Blueprint Project Vector on to Plane

Hey,

im trying to get the projection of two vectors on a Plane, but the result is rediculous.

The upper vectors are projected and result in the ones pointing down.

here is the code

maybe my math is horribly broken, or the “project vector on to plane” function is broken.

here is the actor (uasset). Place it in the world and hit play.
[uasset][3]

apprechiate any help
regards

Hello edstoica,

I ran a few tests on the node. It appears to be working as intended. Without knowing what it is exactly that you are trying to achieve I cannot point you towards another solution. As this does not appear to be a bug. I will be moving it out of bug reports.

Make it a great day

Hey Rudy,

thanks for ur answer. I did not tell what i would expect, because I guesed its obivous.

When projecting a vector onto a plane, I expect a resulting vector that lies onto that plane, as a beamer projects an image on a wall. The picture should make it clear what I expect. The red vector is projected onto the plane and results in the green vector.

What is not the case in the example I posted in the opening post. Is my understanding of what the function should do wrong?

I have provided an example below on how you could achieve the result that you are looking for. I hope this example helps.

Example:

In the example below I created a plane at the world origin. The normal for this plane is straight up (0,0,1), I then passed in the vector that I wanted to be projected on to the plane (the red debug line). I then provided the result as the end point for second debug line (green).

Make it a great day

2 Likes

thanks for ur minimal example and ur help.

The actual problem was: the “project vector on to plane” function needs a normalized normal. I did not normalize my normal. Would be nice if mentioned in the pin comment.

1 Like

You have to note that function provided assumes plane has origin (0,0,0) as one of its points. You can’t define plane just with normal