• Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a \$25 Amazon gift card!

### Hide differencesHistory of post edits

Posted 21 April 2013 - 06:47 AM

Hello again , I solve the rotation problem by :

            Vector3 forward = cci.Camera.WorldMatrix.Forward + new Vector3(0, -1, 0);

{
}
{
}

Matrix translatePlayer = Matrix.CreateTranslation(cci.Camera.WorldMatrix.Translation + forward);
Matrix scalePlayer = Matrix.CreateScale(0.05f);

Matrix rotatePlayer = Matrix.CreateRotationX(cci.Camera.Pitch) *
Matrix.CreateFromAxisAngle(Vector3.Up, cci.Camera.Yaw);
staticModel.Transform = scalePlayer * rotatePlayer * translatePlayer ;


but , all what I want is to prevent hands to be visible when rotating down , I try this code  and did not works good ? so any solutions or suggestion ?



{
}
{
}



Hello again , I solve the rotation problem by :

            Vector3 forward = cci.Camera.WorldMatrix.Forward + new Vector3(0, -1, 0);            if (cci.Camera.Pitch <= MathHelper.ToRadians(-40))            {                cci.Camera.Pitch += MathHelper.ToRadians(1);            }            if (cci.Camera.Pitch >= MathHelper.ToRadians(40))            {                cci.Camera.Pitch -= MathHelper.ToRadians(1);            }            Matrix translatePlayer = Matrix.CreateTranslation(cci.Camera.WorldMatrix.Translation + forward);            Matrix scalePlayer = Matrix.CreateScale(0.05f);            Matrix rotatePlayer = Matrix.CreateRotationX(cci.Camera.Pitch) *                Matrix.CreateFromAxisAngle(Vector3.Up, cci.Camera.Yaw);            staticModel.Transform = scalePlayer * rotatePlayer * translatePlayer ;

but , all what I want is to prevent hands to be visible when rotating down , I try this code  and did not works good ? so any solutions or suggestion ?

Posted 21 April 2013 - 06:40 AM

Hello again , I solve the rotation problem by :

            Vector3 forward = cci.Camera.WorldMatrix.Forward + new Vector3(0, -1, 0);

{
}
{
}

Matrix translatePlayer = Matrix.CreateTranslation(cci.Camera.WorldMatrix.Translation + forward);
Matrix scalePlayer = Matrix.CreateScale(0.05f);

Matrix rotatePlayer = Matrix.CreateRotationX(cci.Camera.Pitch) *
Matrix.CreateFromAxisAngle(Vector3.Up, cci.Camera.Yaw);
staticModel.Transform = scalePlayer * rotatePlayer * translatePlayer ;


but , all what I want is to prevent hands to be visible when rotating down , I try this code  and did not works good ? so any solutions or suggestion ?