[Solved] [UE v5.3.2] Is it a bug ? Problem with BoxExtent (Blueprint)

Hello everyone,

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 :

  1. [Image] The logic of my Blueprint.
  2. [Image] The result displayed in the level.
  3. A compressed project ready for use.

Could you tell me if this is a bug or a misuse/misunderstanding on my part?

Thank you very much in advance! :slight_smile:


  1. UE5.3.2_GetComponentBounds_Sample.zip (32.7 KB)

1 Like

Get component bounds will expand to encompass the whole object during rotation.

So, for a cube, when it’s level, the bounds are the same as the cube. But when you raise one of the corners, the bounds expands to contain it.

It’s working correctly :slight_smile:

bounds

1 Like

Thanks for your reply!

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).

Is this what I needed to understand?

EDIT: THX for the GIF! :smiley:

Correct :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.