seperation of body initialization, glider model
[carveJwlIkooP6JGAAIwe30JlM.git] / player_glide.h
index e50fde3755b77d14e0032a69bdaebab02b7caf64..0794b1c9b9347bca0b7c83ef9f85058bcd5af93b 100644 (file)
@@ -17,8 +17,44 @@ struct player_glide {
        info_drag;
 
    u32 ticker;
+
+   rigidbody rb;
+
+   struct {
+      v3f co, euler;
+      m4x3f mdl;
+      
+      union {
+         rb_capsule inf;
+         f32 r;
+      };
+
+      enum rb_shape shape;
+   }
+   parts[3];
 }
-static player_glide;
+static player_glide = {
+   .parts = {
+      {
+         .co    = { 1.0f, 1.0f, -1.0f },
+         .euler = { VG_TAUf*0.25f,  VG_TAUf*0.125f, 0.0f },
+         .shape = k_rb_shape_capsule,
+         .inf   = { .h = 2.82842712475f, .r = 0.25f },
+      },
+      {
+         .co    = { -1.0f, 1.0f, -1.0f },
+         .euler = { VG_TAUf*0.25f, -VG_TAUf*0.125f, 0.0f },
+         .shape = k_rb_shape_capsule,
+         .inf   = { .h = 2.82842712475f, .r = 0.25f },
+      },
+      {
+         .co    = { 0.0f, 0.0f, 0.0f },
+         .euler = { 0.0f, 0.0f, 0.0f },
+         .shape = k_rb_shape_sphere,
+         .r     = 0.5f
+      }
+   }
+};
 
 static void player_glide_pre_update(void);
 static void player_glide_update(void);