I want to load a character into my game, which has an outline (anime style) already included in the GLB file. However, when I load it, my character appears black (see image).
The model’s mapper told me that I need to enable backface culling, but I can't find how to do that in Bevy. When I enable it in Blender (see image), the outline is displayed correctly.
commands.spawn(SceneRoot(asset_server.load(GltfAssetLabel::Scene(0).from_asset("entities/player/player_idle.glb"))))
.insert(Name::new("WorldPlayer"))
.insert(NoFrustumCulling)
.insert(AnimatedPlayer)
.insert(Transform::from_xyz(40.0, 0.249, 40.0))
.insert(ThirdPersonCameraTarget)
.insert(WorldPlayer::default())
.insert(LivingEntity)
.insert(RigidBody::Dynamic)
.insert(Velocity::default())
.insert(GravityScale(2.5))
.insert(Damping {
angular_damping: 2.0,
linear_damping: 2.0
})
.insert(LockedAxes::ROTATION_LOCKED_X | LockedAxes::ROTATION_LOCKED_Z)
.insert(Collider::capsule(Vec3::new(0.0, 0.2, 0.0), Vec3::new(0.0, 1.6, 0.0), 0.2))
.insert(KinematicCharacterController {
max_slope_climb_angle: 45_f32.to_radians(),
min_slope_slide_angle: 35_f32.to_radians(),
autostep: Some(CharacterAutostep {
include_dynamic_bodies: true,
min_width: CharacterLength::Absolute(0.05),
max_height: CharacterLength::Absolute(0.55)
}),
snap_to_ground: Some(CharacterLength::Absolute(0.075)),
..default()
});
Can someone help me with this?
Thanks in advance! 😃