diff --git a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/PlayerFragment.java b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/PlayerFragment.java index cbffdcd..8a269d2 100644 --- a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/PlayerFragment.java +++ b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/PlayerFragment.java @@ -40,7 +40,7 @@ private float touchX = 0.0f; private float touchY = 0.0f; RWTPad pad = null; - double n=0.0; + double n=1.0; public PlayerFragment() { // Required empty public constructor @@ -178,7 +178,14 @@ } else if (isTouched) { pocha.rotY(0.1 * (0.5f - touchX)); - n += (0.5f-touchY); + if(n <= 5 && n >= 0){ + n += (0.5f - touchY); + }else if (n >5){ + n = 5; + }else if (n < 0){ + n = 0; + } + } else { curV.setX(0.0); curV.setZ(0.0); @@ -188,7 +195,7 @@ // 向き設定 camera.setViewPoint(pocha.getPosition().add(5.0 * charaVector3d.getX(), charaVector3d.getY() + 5.5 - n, 5.0 * charaVector3d.getZ()));//視点 camera.setViewLine(new Vector3d(-5.0 * charaVector3d.getX(), charaVector3d.getY() - 2.5 + n, -5.0 * charaVector3d.getZ()));//視線 - } +} //sampleUiFragmentからそのまま持ってきた public void initGameWindowView() {