i am trying to get the Axis of a block when the player hits it
i can get the vales i need when i hit the box with values of,
X 0.0 Y -1.0 Z 0.0
X 0.0 Y 1.0 Z 0.0
X 1.0 Y 0.0 Z 0.0
X -1.0 Y 0.0 Z 0.0
with the 1 being one side of the box and the -1 on the other side of the box on the same Axis, the problem i have is when i get a === vector node and set the to a Enum it the vector === doesn’t register the negative value so i can only set one side of the box, is there any other way of doing this
I get that you detect the direction of the surface a block is facing by returning the correlated unit vectors, but I’m lost in the second paragraph. There isn’t a “===” operator in C++, nor in the blueprints (turns out there is). Or am I missing a point here? Could you please clarify your objective and also provide the screenshots of your code?
it a “equal exactly vector” node in blueprints which is === maybe I am using it wrong, i did think it was just like the equal node, but for vectors. i already know what side the face is by the normal hit, 1 being one side of box -1 being the other side, if the box is rotated slightly then i can just use a round node to maintain the 1 and -1. but it probable won’t be anyway
also I don’t know C++ sorry.
All good I figured it out, I think it was just a comedy of Erros on my part, with the main problem being i just prompted the Enum off the “Set Plane Constraint Axis setting node” to a variable witch it didn’t like for some reason. so, I just crated a new Emem with the same values, i also switch to a == node and set the tolerance to .5, witch i did think i already had done, which is why i switched to the === node
I’m still not sure what’s going on but I’m glad you solved it! Oh and sorry for that, because there weren’t such an operator in C++, I was confident that blueprints also didn’t have it since… blueprints are C++ too. (out of curiosity I did some research and found out that even though the engine was made with C++, blueprints are compiled differently than C++. I was aware of the difference in compiling but didn’t expect that to lead to such differences as well. So I think I can’t call blueprints C++ like that) And I wasn’t on PC when I posted that so I wasn’t able to test it myself either.