rotation from physics

This commit is contained in:
2021-02-13 21:54:59 -08:00
parent b18ea7371a
commit 2c9ce75b8b
5 changed files with 1656 additions and 1656 deletions

View File

@@ -4,6 +4,7 @@ use rapier3d::dynamics::{RigidBody, RigidBodyHandle};
use rapier3d::geometry::ColliderHandle;
use rapier3d::geometry::Collider as r3dCollider;
use std::time::{Duration, Instant};
use cgmath::Deg;
// a component is any type that is 'static, sized, send and sync
@@ -19,7 +20,7 @@ pub struct Position {
pub x: f32,
pub y: f32,
pub z: f32,
pub rot: cgmath::Quaternion<f32>,
pub rot: cgmath::Euler<Deg<f32>>,
}
#[derive(Clone, Copy, Debug, PartialEq)]