Is there a way I can tilt a collision hull of a player model independently from the player model itself (without tilting the player model as well)?

I have a collision hull made for the player when it walks upright (using a "walk" animation), and it is the perfect size and dimensions for the player while it walks upright. The camera faces the player's back when it walks upright.

The player also has a "swim" animation, to which I tilted the player model forward, to give the appearance of the player swimming as if it is lying on its stomach in the air, and the camera faces the bottom of the player's feet.

I have it programmed in the game so that the player's "walk" animation is in effect when it is out of the water. When it jumps into the water, the "swim" animation gets executed making the player's body tilt forward, so that the camera is facing the bottom of the player's feet as it swims in the water, instead of facing its back like it did while it was walking upright.

When the player is walking upright, the collision hull is right where it needs to be. When the player jumps into the water, initiating the "swim" animation, the collision hull stays where its at while the player's body tilts forward, so that the collision hull is not lining up with the player's body anymore, like it did while it was walking upright. It more crosses the player's body like a cross.

Is there a way I can tilt the collision hull forward to be in line with the player's body as it swims, while keeping the player model and its animations the way they are without changing them? This is the code I have so far:

Code:
action player_action()
{
   ...

   ent_create(NULL, &my->x, actCameraCollider); // Creating camera
                                                //    collider for
                                                //    collision hull.

   ...

   vec_set(&my->max_x, vector(2, 23, 50.5)); // Setting collision                                   
   vec_set(&my->min_x, vector(-2, -23, 0));  //    hull dimensions

   ...

   while(1)
   {
      ...

      if((key_w == 1) || (key_s == 1) || (key_a == 1) || (key_d ==
          1))
      {
         ...

         ent_animate(me,"walk",my.ANIMATION,ANM_CYCLE);
            // In "walk" animation, player is standing upright, and
            //    the collision hull fits player's "standing upright"
            //    pose perfectly.
      }

      ...

      if(my.status == playerInWater) 
      {
         ...

         my.ANIMATION += 0.4*distance; 
         ent_animate(me,"swim",my.ANIMATION,ANM_CYCLE); 
            // "swim" animation has player tilting forward in a  
            //    swimming pose, instead of standing up.

         &my.tilt -= 60; // Trying to tilt collision hull to go in
                         //    line with player's swimming body, but
                         //    this is not working.  It is not 
                         //    tilting an inch.

         ...
		
      }										  	
      wait(1);
   }
}



I tried doing this:

Code:
@my.tilt -= 40; // ...and various other numbers



...but the collision box is not tilting an inch. Any advice would be greatly appreciated on how to tilt the collision box independently from the player model itself. Thank you.

Last edited by Ruben; 03/22/18 03:41.