From d34b52e33fd541c3756fc0e2e57061af12bd71db Mon Sep 17 00:00:00 2001 From: Franklin Blanco Date: Thu, 16 Nov 2023 13:24:54 -0800 Subject: [PATCH] added cylinder invisible with character from blender --- assets/character/main_character.glb | Bin 52438652 -> 52441664 bytes src/comps/core/markers/proxy/bevy/mod.rs | 1 + .../core/markers/proxy/bevy/visbility.rs | 78 ++++++++++++++++++ src/comps/core/markers/proxy/mod.rs | 3 +- .../core/markers/proxy/physics/rapier.rs | 4 +- src/comps/core/markers/proxy/plugin.rs | 3 + src/comps/core/spawners/player.rs | 4 +- src/comps/core/spawners/spawn.rs | 2 - src/setup/assets.rs | 2 - 9 files changed, 88 insertions(+), 9 deletions(-) create mode 100644 src/comps/core/markers/proxy/bevy/mod.rs create mode 100644 src/comps/core/markers/proxy/bevy/visbility.rs diff --git a/assets/character/main_character.glb b/assets/character/main_character.glb index c56e74ec5e4b6c1c01917717b04a695539a896e6..957bf0697581117bc7f7d82207fea46c4e615ceb 100644 GIT binary patch delta 15766 zcmai*2Ygh;7RF~bG$|p35I|Z8DhL5~?{-R-DkxGEMCk^I(xs^saTAL4x{#q0nt}}w z6_pZD0R>d>VMhfO6;Pxo0?()K`{wR$?j{)a`u*>eGiT!Zh zVCD!oN*$g#W>9Jqmm@88M8Hy!mG@Yt|ng9m1gPEAW4GazFadV1L#Io*Dz-|g^v z9A3k4dtBZ$dn3QY>vQ?+ZoAv>avFXgnhdwg>9D)pKA+#`cDbB=(o)BU{>VtIU^x6v zr_*itU0%cKcBI)u*;j83;>a{;URDZuCv~qv>(2)IxbcI&!ua9-tPH3N*G0?J5 zcPQ>avrzVdq)^ubjY1a>R1PgY&_nt{mkzWH9XMDe)ZyTSP~g3)p>GcMmyS@&_p;0Q z(+tB7Ir^l9j$KK{bR|MF->(|7y+0_Fbf|4;%lnz3-iPBuC$5yyeajA)4|RI4^!9rX zB}lBJ&*A2wzYbRny>z&9sO6EWp-M;6LYt4ohe{tQ6Y6=Sv-GKiWLYh=|45TWh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0~8$HXb(H1P@XDe)Qccj9y63*t-SE8=V78{%8y4Dk=*pTxh2 z?}+b-ABZ1`v&1>#Jn@rj=7PO$TnNHNxQPfNlBh;hC$1rC5K%-;q83q`s6*5x>Jjyc lXrciTLo_5B5wS#Lq6yKIxRz)}G$&fP*Dcr^=Uy`C{{RRgL9GA) diff --git a/src/comps/core/markers/proxy/bevy/mod.rs b/src/comps/core/markers/proxy/bevy/mod.rs new file mode 100644 index 0000000..aa68907 --- /dev/null +++ b/src/comps/core/markers/proxy/bevy/mod.rs @@ -0,0 +1 @@ +pub mod visbility; \ No newline at end of file diff --git a/src/comps/core/markers/proxy/bevy/visbility.rs b/src/comps/core/markers/proxy/bevy/visbility.rs new file mode 100644 index 0000000..5c8c9da --- /dev/null +++ b/src/comps/core/markers/proxy/bevy/visbility.rs @@ -0,0 +1,78 @@ +/*use bevy::{prelude::*, render::view::Visibility as BevyVisibility}; +use bevy_rapier3d::prelude::*; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub enum Visibility { + Visible, + Hidden, + #[default] + Inherited +} + + +// replaces all physics stand-ins with the actual rapier types +pub fn bevy_replace_proxies( + mut proxy_colliders: Query< + (Entity, &BevyVisibility, &Name, &mut Visibility), + (Without, Added), + >, + mut commands: Commands, +) { + + for proxy_colider in proxy_colliders.iter_mut() { + let (entity, collider_proxy, name, mut visibility) = proxy_colider; + // we hide the collider meshes: perhaps they should be removed altogether once processed ? + if name.ends_with("_collider") || name.ends_with("_sensor") { + *visibility = Visibility::Hidden; + } + + let mut rapier_collider: RapierCollider; + match collider_proxy { + Collider::Ball(radius) => { + println!("proxy: ball"); + rapier_collider = RapierCollider::ball(*radius); + commands.entity(entity) + .insert(rapier_collider) + .insert(ActiveEvents::COLLISION_EVENTS) // FIXME: this is just for demo purposes !!! + ; + } + Collider::Cuboid(size) => { + println!("proxy: cuboid"); + rapier_collider = RapierCollider::cuboid(size.x, size.y, size.z); + commands.entity(entity) + .insert(rapier_collider) + .insert(ActiveEvents::COLLISION_EVENTS) // FIXME: this is just for demo purposes !!! + ; + } + Collider::Capsule(a, b, radius) => { + println!("proxy: capsule"); + rapier_collider = RapierCollider::capsule(*a, *b, *radius); + commands.entity(entity) + .insert(rapier_collider) + .insert(ActiveEvents::COLLISION_EVENTS) // FIXME: this is just for demo purposes !!! + ; + } + Collider::Mesh => { + println!("proxy: mesh"); + for (_, collider_mesh) in + Mesh::search_in_children(entity, &children, &meshes, &mesh_handles) + { + rapier_collider = RapierCollider::from_bevy_mesh( + collider_mesh, + &ComputedColliderShape::TriMesh, + ) + .unwrap(); + commands + .entity(entity) + .insert(rapier_collider); + // FIXME: this is just for demo purposes !!!; + //.insert(ActiveEvents::COLLISION_EVENTS); + // .insert(ActiveEvents::COLLISION_EVENTS) + // break; + + } + } + } + } +}*/ \ No newline at end of file diff --git a/src/comps/core/markers/proxy/mod.rs b/src/comps/core/markers/proxy/mod.rs index 57a6743..273481d 100644 --- a/src/comps/core/markers/proxy/mod.rs +++ b/src/comps/core/markers/proxy/mod.rs @@ -1,3 +1,4 @@ pub mod character; pub mod plugin; -pub mod physics; \ No newline at end of file +pub mod physics; +pub mod bevy; \ No newline at end of file diff --git a/src/comps/core/markers/proxy/physics/rapier.rs b/src/comps/core/markers/proxy/physics/rapier.rs index b0b31e4..54c9708 100644 --- a/src/comps/core/markers/proxy/physics/rapier.rs +++ b/src/comps/core/markers/proxy/physics/rapier.rs @@ -1,7 +1,7 @@ use bevy::prelude::*; // use bevy::render::primitives::Aabb; -use bevy_rapier3d::geometry::{Collider as RapierCollider, Sensor}; -use bevy_rapier3d::prelude::{ActiveCollisionTypes, ActiveEvents, ComputedColliderShape}; +use bevy_rapier3d::geometry::Collider as RapierCollider; +use bevy_rapier3d::prelude::{ActiveEvents, ComputedColliderShape}; use super::utils::*; diff --git a/src/comps/core/markers/proxy/plugin.rs b/src/comps/core/markers/proxy/plugin.rs index e16132f..f8209e2 100644 --- a/src/comps/core/markers/proxy/plugin.rs +++ b/src/comps/core/markers/proxy/plugin.rs @@ -10,6 +10,9 @@ pub struct ProxyComponentsPlugin; impl Plugin for ProxyComponentsPlugin { fn build(&self, app: &mut bevy::prelude::App) { + // Bevy + + // Character app.register_type::(); app.register_type::(); diff --git a/src/comps/core/spawners/player.rs b/src/comps/core/spawners/player.rs index d4e8974..aac0dab 100644 --- a/src/comps/core/spawners/player.rs +++ b/src/comps/core/spawners/player.rs @@ -16,7 +16,7 @@ use crate::{ player_values_state::PlayerValuesState, }, }, - setup::{equipment::EquipmentChangeEvent, load_state::GameLoadState, assets::{GltfAsset, GltfAssets}}, + setup::{equipment::EquipmentChangeEvent, load_state::GameLoadState, assets::GltfAssets}, }; use super::spawn_point::SpawnPoint; @@ -49,7 +49,7 @@ pub fn player_spawner( } for (player_spawn_point_entity, player_spawn_point) in player_sp_query.iter() { - let mut plyer_transform = Transform::from_xyz(25.0, 0.0, 25.0).with_scale(Vec3 { x: 3.0, y: 3.0, z: 3.0 }); + let plyer_transform = Transform::from_xyz(25.0, 0.0, 25.0).with_scale(Vec3 { x: 3.0, y: 3.0, z: 3.0 }); commands.spawn( ( SceneBundle { diff --git a/src/comps/core/spawners/spawn.rs b/src/comps/core/spawners/spawn.rs index 24f03ed..dcc009b 100644 --- a/src/comps/core/spawners/spawn.rs +++ b/src/comps/core/spawners/spawn.rs @@ -1,7 +1,5 @@ use bevy::prelude::*; -use crate::comps::core::markers::proxy::physics::rapier::physics_replace_proxies; - use super::{ item::{item_spawner, ItemSpawnPointPlugin}, player::player_spawner, diff --git a/src/setup/assets.rs b/src/setup/assets.rs index 4727322..311416b 100644 --- a/src/setup/assets.rs +++ b/src/setup/assets.rs @@ -5,8 +5,6 @@ use crate::{ scenes::scene1::skybox::{Cubemap, CUBEMAPS}, }; -use super::load_state::GameLoadState; - #[derive(PartialEq, Eq, PartialOrd, Ord, Reflect)] pub enum GltfAssetType { Firearm(Firearm),