fix cyberbike visibility

This commit is contained in:
Joe Ardent 2023-01-20 15:07:37 -08:00
parent ca59748849
commit efb70e16d0
2 changed files with 11 additions and 4 deletions

View file

@ -53,12 +53,19 @@ fn spawn_cyberbike(mut commands: Commands, asset_server: Res<AssetServer>) {
let mass_properties = ColliderMassProperties::Density(0.2);
let (membership, filter) = BIKE_BODY_COLLISION_GROUP;
let bike_collision_group = CollisionGroups::new(membership.into(), filter.into());
let bike_collision_group = CollisionGroups::new(membership, filter);
let scene = asset_server.load("cb-no-y_up.glb#Scene0");
let spatialbundle = SpatialBundle {
transform: xform,
..Default::default()
};
let bike = commands
.spawn_empty()
.insert(RigidBody::Dynamic)
.insert((xform, GlobalTransform::default()))
.insert(spatialbundle)
.insert((
bcollider_shape,
bike_collision_group,
@ -78,7 +85,7 @@ fn spawn_cyberbike(mut commands: Commands, asset_server: Res<AssetServer>) {
.insert(CyberBikeCollider)
.with_children(|rider| {
rider.spawn(SceneBundle {
scene: asset_server.load("cb-no-y_up.glb#Scene0"),
scene,
..Default::default()
});
})

View file

@ -40,7 +40,7 @@ fn update_input(mut events: EventReader<GamepadEvent>, mut istate: ResMut<InputS
}
}
dbg!(&istate);
//dbg!(&istate);
}
pub struct CyberInputPlugin;