You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bounding volume of the renderer.
*/
get bounds(): BoundingBox {
const changeFlag = this._transformChangeFlag;
if (changeFlag.flag) {
this._updateBounds(this._bounds);
changeFlag.flag = false;
}
return this._bounds;
}
The bounds of renderer only update when transformChangeFlag changed.
When I use MeshRenderer to render a mesh and change the bounds of MeshRenderer.mesh, renderer bounds won't update.
Min and max will alway be Vector3(0, 0, 0).
Describe the bug
According to the following code:
https://github.com/oasis-engine/engine/blob/main/packages/core/src/Renderer.ts#L83
/**
*/
get bounds(): BoundingBox {
const changeFlag = this._transformChangeFlag;
if (changeFlag.flag) {
this._updateBounds(this._bounds);
changeFlag.flag = false;
}
return this._bounds;
}
The bounds of renderer only update when transformChangeFlag changed.
When I use MeshRenderer to render a mesh and change the bounds of MeshRenderer.mesh, renderer bounds won't update.
Min and max will alway be Vector3(0, 0, 0).
To Reproduce
Steps to reproduce the behavior:
const { bounds } = mesh;
bounds.min.setValue(-1, -1, -1);
bounds.max.setValue(1, 1, 1);
Expected behavior
When update bounds of mesh, MeshRenderer's bounds will also get update.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: