better water
[carveJwlIkooP6JGAAIwe30JlM.git] / character.h
index 047b714df02f62db79b113299848d467abdc2691..59fbdca1408cbdb44b0b7245c902b72834c02178 100644 (file)
@@ -422,7 +422,7 @@ void character_final_pose( struct character *ch, v3f cog,
       character_pose *pose, float q )
 {
    character_pose npose;
-   float dip = vg_clampf(cog[1], -1.0f, 0.3f) * 0.35f,
+   float dip = vg_clampf(cog[1], -1.0f, 0.3f) * 0.5f,
          tilt = vg_clampf(cog[2], -1.0f, 1.0f) * 0.3f;
 
    v4f rz; m4x3f tr;
@@ -447,6 +447,18 @@ void character_final_pose( struct character *ch, v3f cog,
    character_pose_blend( ch, &npose, q );
 }
 
+static void character_yaw_upper( struct character *ch, float yaw )
+{
+   m3x3f r;
+   v4f q;
+
+   q_axis_angle( q, (v3f){0.0f,1.0f,0.0f}, yaw );
+   q_m3x3( q, r );
+
+   m3x3_mulv( r, ch->ik_body.pole, ch->ik_body.pole );
+   m3x3_mulv( r, ch->ik_body.end, ch->ik_body.end );
+}
+
 static void zero_ik_basic( struct ik_basic *ik )
 {
    v3_zero( ik->base );