I'm having trouble getting these faces in my GLTF to render regardless of the camera distance. The farther away I go, the more faces render and the closer I get the less render...
The model is loaded using bevy_asset_loader like so:
pub struct LoadingPlugin;
impl Plugin for LoadingPlugin {
fn build(&self, app: &mut App) {
app.add_state::<GameState>()
.add_loading_state(
LoadingState::new(GameState::Loading).continue_to_state(GameState::Playing),
)
.add_collection_to_loading_state::<_, ModelAssets>(GameState::Loading)
.add_collection_to_loading_state::<_, AnimationAssets>(GameState::Loading);
}
}
#[derive(AssetCollection, Resource)]
pub struct ModelAssets {
#[asset(path = "models/player.glb#Scene0")]
pub player_model: Handle<Scene>,
}
And the player is spawned like so:
fn spawn_player(mut commands: Commands, models: Res<ModelAssets>) {
commands
.spawn(SceneBundle {
scene: models.player_model.clone(),
transform: Transform::from_xyz(10.0, 0.04, 10.0)
.with_rotation(Quat::from_rotation_y(std::f32::consts::PI * 1.5)),
..Default::default()
})
.insert(Name::new("Player"))
.insert(Player {});
}