Just added android support
This commit is contained in:
@@ -6,11 +6,11 @@ description = "Community crate for OpenXR in Bevy"
|
|||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["openxr/mint", "linked"]
|
default = ["openxr/mint"]
|
||||||
linked = ["openxr/linked"]
|
linked = ["openxr/linked"]
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [ "examples/android" ]
|
members = ["examples/android", "examples/demo"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
|
|||||||
3878
examples/demo/Cargo.lock
generated
3878
examples/demo/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -3,9 +3,13 @@ name = "demo"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = "0.12"
|
bevy = "0.12"
|
||||||
bevy_openxr = "0.0.1"
|
bevy_oxr = { path = "../../" }
|
||||||
bevy_rapier3d = { git = "https://github.com/alexichepura/bevy_rapier", version = "0.22.0" }
|
bevy_rapier3d = { git = "https://github.com/devil-ira/bevy_rapier", branch = "bevy-0.12" }
|
||||||
|
color-eyre = "0.6.2"
|
||||||
|
|||||||
34
examples/demo/manifest.yaml
Normal file
34
examples/demo/manifest.yaml
Normal 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
|
||||||
@@ -5,10 +5,11 @@ use bevy::{
|
|||||||
ecs::schedule::ScheduleLabel,
|
ecs::schedule::ScheduleLabel,
|
||||||
log::info,
|
log::info,
|
||||||
prelude::{
|
prelude::{
|
||||||
default, shape, App, Assets, Color, Commands, Component, Entity, Event, EventReader,
|
bevy_main, default, shape, App, Assets, Color, Commands, Component, Entity, Event,
|
||||||
EventWriter, FixedUpdate, Gizmos, GlobalTransform, IntoSystemConfigs, IntoSystemSetConfigs,
|
EventReader, EventWriter, FixedUpdate, Gizmos, GlobalTransform, IntoSystemConfigs,
|
||||||
Mesh, PbrBundle, PostUpdate, Quat, Query, Res, ResMut, Resource, Schedule, SpatialBundle,
|
IntoSystemSetConfigs, Mesh, PbrBundle, PostUpdate, Quat, Query, Res, ResMut, Resource,
|
||||||
StandardMaterial, Startup, Transform, Update, Vec3, Vec3Swizzles, With, Without, World,
|
Schedule, SpatialBundle, StandardMaterial, Startup, Transform, Update, Vec3, Vec3Swizzles,
|
||||||
|
With, Without, World,
|
||||||
},
|
},
|
||||||
time::{Fixed, Time, Timer},
|
time::{Fixed, Time, Timer},
|
||||||
transform::TransformSystem,
|
transform::TransformSystem,
|
||||||
@@ -36,6 +37,7 @@ mod setup;
|
|||||||
use crate::setup::setup_scene;
|
use crate::setup::setup_scene;
|
||||||
use bevy_rapier3d::prelude::*;
|
use bevy_rapier3d::prelude::*;
|
||||||
|
|
||||||
|
#[bevy_main]
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
color_eyre::install().unwrap();
|
color_eyre::install().unwrap();
|
||||||
|
|
||||||
@@ -282,10 +284,8 @@ fn spawn_physics_hands(mut commands: Commands) {
|
|||||||
let right_hand_membership_group = Group::GROUP_2;
|
let right_hand_membership_group = Group::GROUP_2;
|
||||||
let floor_membership = Group::GROUP_3;
|
let floor_membership = Group::GROUP_3;
|
||||||
|
|
||||||
|
|
||||||
for hand in hands.iter() {
|
for hand in hands.iter() {
|
||||||
let hand_membership = match hand
|
let hand_membership = match hand {
|
||||||
{
|
|
||||||
Hand::Left => left_hand_membership_group,
|
Hand::Left => left_hand_membership_group,
|
||||||
Hand::Right => right_hand_membership_group,
|
Hand::Right => right_hand_membership_group,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user