#terrain disappears?

1 messages · Page 1 of 1 (latest)

frank junco
#

I have a single terrain object with a bounding box of 320x40x320 of default bevy units. Most of the time it seems to get culled. It generally isn't visible unless I'm looking either straight up or down. My camera settings are default. Docs say far plane is at 1000. That should be far enough to render this thing... Remeshing it to 32x4x32 makes it all visible and fine. Any idea what's happening?

coarse shore
#

Try adding NoFrustumCulling to the terrain entity
You might need to update the Aabb - it could be stuck at whatever was generated when you first created the Mesh, and won't update if you later change it

opal hatch
#

Try slappin' a ShowAabbGizmo component on that entity so you can check the bounding box

frank junco
#

Ah I didn't realize it HAD Aabb 😅 I was just updating Handle<Mesh>

frank junco
#

Wait uh... PbrBundle doesn't have Aabb component

coarse shore
#

No but it does contain a Handle<Mesh>, and calculate_bounds

/// Computes and adds an [Aabb] component to entities with a
/// Handle<Mesh> component and without a [NoFrustumCulling] component.