• Create Account

We're offering banner ads on our site from just \$5!

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);

if (cci.Camera.Pitch <= MathHelper.ToRadians(-40))
{
}
if (cci.Camera.Pitch >= MathHelper.ToRadians(40))
{
}

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 ?



if (cci.Camera.Pitch <= MathHelper.ToRadians(-40))
{
}
if (cci.Camera.Pitch >= MathHelper.ToRadians(40))
{
}



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);

if (cci.Camera.Pitch <= MathHelper.ToRadians(-40))
{
}
if (cci.Camera.Pitch >= MathHelper.ToRadians(40))
{
}

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 ?



if (cci.Camera.Pitch <= MathHelper.ToRadians(-40))
{