block lower body rotation

Jorgefo

New member
Hi



I try to make the character move only left to right, I make a simple movement type

C#:
    public class MoveTypeCustom : MovementType

    {

        public override bool FirstPersonPerspective { get { return false; } }



        public override float GetDeltaYawRotation(float characterHorizontalMovement, float characterForwardMovement, float cameraHorizontalMovement, float cameraVerticalMovement)

        {

            return 0;

        }



        public override Vector2 GetInputVector(Vector2 inputVector)

        {

            return new Vector2(inputVector[0], 0);

        }

    }



and is working, but with the animation like Roll not working very well, I block this with a box collider, I dont know is the best way to do this but is working


I make the character look at the mouse pointer to do that but i need only upper body to do that, becouse when the lower body rotate and try make a animation like roll, the character roll in direction of the foot and change Z axis of the character

My problem is try to block the lower body but the Character IK is rotate the lower body, exist option to block this?

Maybe the best way is change the character IK look at but i dont know is the best way to do that
 
You can set the weights on the character ik component which may get you want you're going for. The Character IK component doesn't rotate the actual lower body though - it has a body weight which will rotate towards the look direction but the lower body stays at the same rotation as the character.
 
Top