示例#1
0
    public void RotateSight(float deltaTime)
    {
        float horizonAngle = sightRotation.y * sightSpeed * deltaTime;

        trans.Rotate(Vector3.up * horizonAngle);
        posture.RotateAngle(posture.bodyObject, -horizonAngle);

        float verticalAngle = sightRotation.z * sightSpeed * deltaTime;

        posture.RotateAngle(posture.headObject, verticalAngle);
    }