-
Hey guys I've been playing around with this engine for some days now and I've stumbled upon this weird clipping when I move my player around: https://imgur.com/a/sID4fxQ // Floor
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(shape::Plane::default())),
transform: Transform {
translation: Vec3::ZERO,
scale: Vec3::new(10.0, 1.0, 10.0),
..default()
},
material: material_handle,
..default()
}); let tex_handle = asset_server.load("PNG/Green/texture_04.png");
let material_handle = materials.add(StandardMaterial {
base_color_texture: Some(tex_handle.clone()),
alpha_mode: AlphaMode::Blend,
unlit: false,
..default()
});
let pbr = PbrBundle {
mesh: meshes.add(Mesh::from(shape::Capsule::default())),
material: material_handle,
transform: Transform::from_xyz(0.0, 1.0, 0.0),
..default()
};
let player_bundle = PlayerBundle {
actor: Actor { pbr, ..default() },
..default()
};
let camera_transform = Transform::from_xyz(0.0, 0.0, 4.0);
let orbit_radius = camera_transform.translation.length();
// Camera
let camera = (
Camera3dBundle {
transform: camera_transform.looking_at(Vec3::ZERO, Vec3::Y),
..default()
},
PlayerCameraMarker,
);
let camera_entity = commands
.spawn((
camera,
PanOrbitCamera {
radius: orbit_radius,
..Default::default()
},
))
.id();
commands.spawn(player_bundle).add_child(camera_entity); |
Beta Was this translation helpful? Give feedback.
Answered by
LeslieM98
Jan 16, 2023
Replies: 1 comment
-
This was solved on the Discord Server. The solution was to remove the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LeslieM98
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was solved on the Discord Server. The solution was to remove the
alpha_mode
. Now the flickering stops and everything works as intended