Box3 - incorrect height calculation

Good afternoon, Box3 returns the wrong height when calculating. Because if the object on the Y-axis is above zero, the function makes an incorrect calculation, it works well when Y = 0

I think you might have to call updateProjectionMatrix for the new position to be registered in its new position?

It does not help
camera.updateProjectionMatrix();
hero…updateProjectionMatrix();

Do you mind demonstration this issue outside of your application with a live example?

The computation seems to work fine here: https://jsfiddle.net/6f8wdou5/

BTW: updateProjectionMatrix() is not relevant here.

Strangely I will revise it at home then, in an easy scene if there is no bug to model, I have already tried, what then interestingly interferes with me. I will sort it out, thank you all for your help.

I understood the essence of the problem, it turns out that the sprite that I added as a title to the character is also involved in the calculation, since I added it as a child of the hero.

1 Like