Just added android support

This commit is contained in:
Schmarni
2023-11-08 04:09:58 +01:00
parent 4307d2a66e
commit e3fd2df070
5 changed files with 49 additions and 3889 deletions

3878
examples/demo/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,9 +3,13 @@ name = "demo"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bevy = "0.12"
bevy_openxr = "0.0.1"
bevy_rapier3d = { git = "https://github.com/alexichepura/bevy_rapier", version = "0.22.0" }
bevy_oxr = { path = "../../" }
bevy_rapier3d = { git = "https://github.com/devil-ira/bevy_rapier", branch = "bevy-0.12" }
color-eyre = "0.6.2"

View File

@@ -0,0 +1,34 @@
android:
runtime_libs:
- "runtime_libs"
manifest:
package: "org.bevyengine.demo_openxr_android"
uses_feature:
- name: "android.hardware.vr.headtracking"
required: true
- name: "oculus.software.handtracking"
required: false
- name: "com.oculus.experimental.enabled"
required: true
uses_permission:
- name: "com.oculus.permission.HAND_TRACKING"
application:
label: "Bevy Openxr Android"
theme: "@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"
meta_data:
- name: "com.samsung.android.vr.application.mode"
value: "vr_only"
- name: "com.oculus.supportedDevices"
value: "quest|quest2|quest3"
activities:
- config_changes: "density|keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|uiMode"
launch_mode: "singleTask"
orientation: "landscape"
intent_filters:
- actions:
- "android.intent.action.MAIN"
categories:
- "com.oculus.intent.category.VR"
- "android.intent.category.LAUNCHER"
sdk:
target_sdk_version: 32

View File

@@ -5,10 +5,11 @@ use bevy::{
ecs::schedule::ScheduleLabel,
log::info,
prelude::{
default, shape, App, Assets, Color, Commands, Component, Entity, Event, EventReader,
EventWriter, FixedUpdate, Gizmos, GlobalTransform, IntoSystemConfigs, IntoSystemSetConfigs,
Mesh, PbrBundle, PostUpdate, Quat, Query, Res, ResMut, Resource, Schedule, SpatialBundle,
StandardMaterial, Startup, Transform, Update, Vec3, Vec3Swizzles, With, Without, World,
bevy_main, default, shape, App, Assets, Color, Commands, Component, Entity, Event,
EventReader, EventWriter, FixedUpdate, Gizmos, GlobalTransform, IntoSystemConfigs,
IntoSystemSetConfigs, Mesh, PbrBundle, PostUpdate, Quat, Query, Res, ResMut, Resource,
Schedule, SpatialBundle, StandardMaterial, Startup, Transform, Update, Vec3, Vec3Swizzles,
With, Without, World,
},
time::{Fixed, Time, Timer},
transform::TransformSystem,
@@ -36,6 +37,7 @@ mod setup;
use crate::setup::setup_scene;
use bevy_rapier3d::prelude::*;
#[bevy_main]
pub fn main() {
color_eyre::install().unwrap();
@@ -282,10 +284,8 @@ fn spawn_physics_hands(mut commands: Commands) {
let right_hand_membership_group = Group::GROUP_2;
let floor_membership = Group::GROUP_3;
for hand in hands.iter() {
let hand_membership = match hand
{
let hand_membership = match hand {
Hand::Left => left_hand_membership_group,
Hand::Right => right_hand_membership_group,
};