Test追加

This commit is contained in:
oogushiyuuga
2026-05-12 12:42:04 +09:00
parent b62c97dc5b
commit 9f2092403a
13 changed files with 2291 additions and 3 deletions

5
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"recommendations": [
"visualstudiotoolsforunity.vstuc"
]
}

10
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Unity",
"type": "vstuc",
"request": "attach"
}
]
}

71
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,71 @@
{
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.vs": true,
"**/.gitmodules": true,
"**/.vsconfig": true,
"**/*.booproj": true,
"**/*.pidb": true,
"**/*.suo": true,
"**/*.user": true,
"**/*.userprefs": true,
"**/*.unityproj": true,
"**/*.dll": true,
"**/*.exe": true,
"**/*.pdf": true,
"**/*.mid": true,
"**/*.midi": true,
"**/*.wav": true,
"**/*.gif": true,
"**/*.ico": true,
"**/*.jpg": true,
"**/*.jpeg": true,
"**/*.png": true,
"**/*.psd": true,
"**/*.tga": true,
"**/*.tif": true,
"**/*.tiff": true,
"**/*.3ds": true,
"**/*.3DS": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.lxo": true,
"**/*.LXO": true,
"**/*.ma": true,
"**/*.MA": true,
"**/*.obj": true,
"**/*.OBJ": true,
"**/*.asset": true,
"**/*.cubemap": true,
"**/*.flare": true,
"**/*.mat": true,
"**/*.meta": true,
"**/*.prefab": true,
"**/*.unity": true,
"build/": true,
"Build/": true,
"Library/": true,
"library/": true,
"obj/": true,
"Obj/": true,
"Logs/": true,
"logs/": true,
"ProjectSettings/": true,
"UserSettings/": true,
"temp/": true,
"Temp/": true
},
"files.associations": {
"*.asset": "yaml",
"*.meta": "yaml",
"*.prefab": "yaml",
"*.unity": "yaml",
},
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.sln": "*.csproj",
"*.slnx": "*.csproj"
},
"dotnet.defaultSolution": "VRProject.slnx"
}

View File

@@ -148,6 +148,9 @@ MonoBehaviour:
highQualityFiltering:
m_OverrideState: 1
m_Value: 0
filter:
m_OverrideState: 1
m_Value: 0
downscale:
m_OverrideState: 1
m_Value: 0

2097
Assets/Scenes/Test.unity Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ef443f0333a244a26b06718135d3c98f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Scripts.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ad75f0386e7324b2a933f1102e309c8d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,39 @@
using UnityEngine;
public class PlayerMove : MonoBehaviour
{
// パラメータ
public float moveSpeed = 5f; // 移動速度
public float gravity = -9.8f; // 重力加速度
public CharacterController controller; // 移動に使うCharacterController
// 演算用変数
private Vector3 velocity; // 加速度を保持する変数
private bool isGrounded; // 地面に着地しているかどうかのフラグ変数
// ゲーム中実行されるUpdate関数
void Update()
{
// 着地状態のチェック
isGrounded = controller.isGrounded;
// 着地している場合は落下速度をリセット
if (isGrounded && velocity.y < 0)
{
velocity.y = -2f; // 地面に着いた場合、速度をリセット
}
// 入力の取得
float h = Input.GetAxis("Horizontal");
float v = Input.GetAxis("Vertical");
// ローカル座標をワールド座標に変換して移動方向を計算
Vector3 moveDirection = transform.TransformDirection(new Vector3(h, 0, v)) * moveSpeed;
// 重力を加算
velocity.y += gravity * Time.deltaTime;
// 移動と重力を一度のcontroller.Moveで処理
controller.Move((moveDirection + velocity) * Time.deltaTime);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3c101f16cf16d4195ba45ae89a7f14d8

View File

@@ -0,0 +1,37 @@
using UnityEngine;
public class PlayerPOV : MonoBehaviour
{
// パラメータ
public Transform neck; // プレイヤーの首のTransformを指定
public float sensitivity = 2.0f; // マウス感度(視点の移動の速さを調整)
public float minVertical = -90.0f; // 視点の最小角度(縦の回転制限)
public float maxVertical = 90.0f; // 視点の最大角度(縦の回転制限)
// 演算用変数
private float rotationX = 0f; // 縦方向の回転角度(首の回転)
// ゲーム開始時に呼ばれる
void Start()
{
// カーソルを非表示&ロック
Cursor.lockState = CursorLockMode.Locked; // カーソルを画面中央に固定
Cursor.visible = false; // カーソルを非表示にする
}
// 毎フレーム実行される
void Update()
{
// マウス入力の取得
float mouseX = Input.GetAxis("Mouse X") * sensitivity; // 横のマウス移動量を取得し、感度で調整
float mouseY = Input.GetAxis("Mouse Y") * sensitivity; // 縦のマウス移動量を取得し、感度で調整
// Playerの回転左右
transform.Rotate(0, mouseX, 0); // プレイヤーの左右の回転をマウスX方向の入力に合わせて行う
// Neckの回転上下
rotationX -= mouseY; // マウスY方向の入力によって縦方向の回転を更新
rotationX = Mathf.Clamp(rotationX, minVertical, maxVertical); // 回転角度を指定された範囲に制限
neck.localRotation = Quaternion.Euler(rotationX, 0, 0); // 首の回転を設定。縦方向のみ回転させる
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 20e0bce59a58a401ca841697d32fb339

View File

@@ -12,8 +12,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: Quality URP Config
m_EditorClassIdentifier:
k_AssetVersion: 12
k_AssetPreviousVersion: 12
k_AssetVersion: 13
k_AssetPreviousVersion: 13
m_RendererType: 1
m_RendererData: {fileID: 0}
m_RendererDataList:
@@ -53,6 +53,7 @@ MonoBehaviour:
m_AdditionalLightsShadowResolutionTierHigh: 1024
m_ReflectionProbeBlending: 0
m_ReflectionProbeBoxProjection: 0
m_ReflectionProbeAtlas: 1
m_ShadowDistance: 10
m_ShadowCascadeCount: 1
m_Cascade2Split: 0.095
@@ -127,8 +128,14 @@ MonoBehaviour:
m_PrefilterSoftShadowsQualityHigh: 1
m_PrefilterSoftShadows: 1
m_PrefilterScreenCoord: 1
m_PrefilterScreenSpaceIrradiance: 0
m_PrefilterNativeRenderPass: 1
m_PrefilterUseLegacyLightmaps: 0
m_PrefilterBicubicLightmapSampling: 0
m_PrefilterReflectionProbeRotation: 0
m_PrefilterReflectionProbeBlending: 0
m_PrefilterReflectionProbeBoxProjection: 0
m_PrefilterReflectionProbeAtlas: 0
m_ShaderVariantLogLevel: 0
m_ShadowCascades: 0
m_Textures:

View File

@@ -1007,7 +1007,7 @@ PlayerSettings:
qnxGraphicConfPath:
apiCompatibilityLevel: 6
captureStartupLogs: {}
activeInputHandler: 1
activeInputHandler: 2
windowsGamepadBackendHint: 0
cloudProjectId: abf7e6b7-7d17-4a14-9df5-86773941d2cc
framebufferDepthMemorylessMode: 0