While trying to calculate the position of the eight vertices of a cube (Box Collision) in a Blueprint, I noticed that I don’t get the same “BoxExtent” values depending on whether I use the “GetBoxExtent” or “GetComponentBounds” function.
The difference in values occurs when the cube in question is rotated.
For “GetBoxExtent”, the vector remains constant (expected behavior).
For “GetComponentBounds”, vector values may change (unexpected behavior).
I provide you with :
[Image] The logic of my Blueprint.
[Image] The result displayed in the level.
A compressed project ready for use.
Could you tell me if this is a bug or a misuse/misunderstanding on my part?
So, to sum up, the functions simply didn’t have the same use:
In one case, it returned the dimensions from the center of my pre-designed cube in the viewport.
In the second case, the function returned the dimensions from the center of a new box (not necessarily a cube) that encompasses my object and whose shape can change as needed (e.g. during a rotation).