Deprecated: Assigning the return value of new by reference is deprecated in /var/www/gamedev/ips_kernel/PEAR/Text/Diff.php on line 383 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/gamedev/ips_kernel/PEAR/Text/Diff.php on line 405 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/gamedev/ips_kernel/PEAR/Text/Diff.php on line 427 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/gamedev/ips_kernel/PEAR/Text/Diff.php on line 449 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/gamedev/ips_kernel/PEAR/Text/Diff/Engine/native.php on line 122 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/gamedev/ips_kernel/PEAR/Text/Diff/Engine/native.php on line 137 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/gamedev/ips_kernel/PEAR/Text/Diff/Engine/native.php on line 139 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/gamedev/ips_kernel/PEAR/Text/Diff/Engine/native.php on line 141 History of post edits
• Create Account

### 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 ?