From 21ae7a0e4f1d4f1ccbd9c9a9af0f15a1cf5cb55c Mon Sep 17 00:00:00 2001
From: Quaternions <krakow20@gmail.com>
Date: Mon, 18 Sep 2023 16:03:27 -0700
Subject: [PATCH] use pva for init

---
 src/body.rs | 8 ++++----
 src/main.rs | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/body.rs b/src/body.rs
index 7ac0313..8cb2a45 100644
--- a/src/body.rs
+++ b/src/body.rs
@@ -278,11 +278,11 @@ impl RelativeCollision {
 pub type TIME = i64;
 
 impl Body {
-	pub fn with_position(position:glam::Vec3) -> Self {
+	pub fn with_pva(position:glam::Vec3,velocity:glam::Vec3,acceleration:glam::Vec3) -> Self {
 		Self{
-			position: position,
-			velocity: glam::Vec3::ZERO,
-			acceleration: glam::Vec3::ZERO,
+			position,
+			velocity,
+			acceleration,
 			time: 0,
 		}
 	}
diff --git a/src/main.rs b/src/main.rs
index 55c8184..551dbef 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -292,7 +292,7 @@ impl strafe_client::framework::Example for Skybox {
 			controls:0,
 		};
 		let physics = strafe_client::body::PhysicsState {
-			body: strafe_client::body::Body::with_position(glam::Vec3::new(5.0,5.0,5.0)),
+			body: strafe_client::body::Body::with_pva(glam::vec3(0.0,50.0,0.0),glam::vec3(0.0,0.0,0.0),glam::vec3(0.0,-100.0,0.0)),
 			time: 0,
 			tick: 0,
 			strafe_tick_num: 100,//100t