non-vr lobby, version fix

This commit is contained in:
joonasp
2022-06-29 14:45:17 +03:00
parent 5774be9822
commit 04baadfad1
1774 changed files with 573069 additions and 1533 deletions

387
Assets/VR_free/Arrow.prefab Normal file
View File

@@ -0,0 +1,387 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4000395504211071412
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4000395504211071411}
- component: {fileID: 4000395504211071409}
- component: {fileID: 4000395504211071410}
- component: {fileID: 4000395504211071408}
m_Layer: 0
m_Name: Shaft
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4000395504211071411
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504211071412}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4000395504732665685}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4000395504211071409
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504211071412}
m_Mesh: {fileID: 4300002, guid: cdfb793862bfc6f4db3776d74885cb47, type: 3}
--- !u!23 &4000395504211071410
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504211071412}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: f7cd62d595c763c428123f260c78b711, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!136 &4000395504211071408
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504211071412}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.016995672
m_Height: 0.8134576
m_Direction: 1
m_Center: {x: 0.004637705, y: 0.018935028, z: -0.0002289713}
--- !u!1 &4000395504388414417
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4000395504388414416}
- component: {fileID: 4000395504388414430}
- component: {fileID: 4000395504388414431}
m_Layer: 0
m_Name: Tip
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4000395504388414416
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504388414417}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: -0.37857613, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4000395504732665685}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4000395504388414430
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504388414417}
m_Mesh: {fileID: 4300000, guid: cdfb793862bfc6f4db3776d74885cb47, type: 3}
--- !u!23 &4000395504388414431
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504388414417}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: f3004e0c0e5df074abcb3548fd812bfc, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &4000395504517758357
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4000395504517758356}
m_Layer: 0
m_Name: Attach
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4000395504517758356
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504517758357}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -0.425}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4000395505580036979}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4000395504732665686
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4000395504732665685}
m_Layer: 0
m_Name: Mesh
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4000395504732665685
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395504732665686}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4000395504211071411}
- {fileID: 4000395504388414416}
m_Father: {fileID: 4000395505580036979}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!1 &4000395505580036983
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4000395505580036979}
- component: {fileID: 4000395505580036980}
- component: {fileID: 4000395505580036981}
- component: {fileID: 4000395505580036982}
m_Layer: 0
m_Name: Arrow
m_TagString: Arrow
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4000395505580036979
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395505580036983}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -78.6947, y: 6.252, z: -11.51497}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4000395504732665685}
- {fileID: 4000395504517758356}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4000395505580036980
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395505580036983}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4efde785f55475d4faf016df659306fa, type: 3}
m_Name:
m_EditorClassIdentifier:
m_InteractionManager: {fileID: 0}
m_Colliders:
- {fileID: 4000395504211071408}
m_InteractionLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_OnFirstHoverEntered:
m_PersistentCalls:
m_Calls: []
m_OnHoverEntered:
m_PersistentCalls:
m_Calls: []
m_OnHoverExited:
m_PersistentCalls:
m_Calls: []
m_OnLastHoverExited:
m_PersistentCalls:
m_Calls: []
m_OnSelectEntered:
m_PersistentCalls:
m_Calls: []
m_OnSelectExited:
m_PersistentCalls:
m_Calls: []
m_OnSelectCanceled:
m_PersistentCalls:
m_Calls: []
m_OnActivate:
m_PersistentCalls:
m_Calls: []
m_OnDeactivate:
m_PersistentCalls:
m_Calls: []
m_CustomReticle: {fileID: 0}
m_AttachTransform: {fileID: 4000395504517758356}
m_AttachEaseInTime: 0.15
m_MovementType: 1
m_TrackPosition: 1
m_SmoothPosition: 1
m_SmoothPositionAmount: 5
m_TightenPosition: 0.5
m_TrackRotation: 1
m_SmoothRotation: 1
m_SmoothRotationAmount: 5
m_TightenRotation: 0.5
m_ThrowOnDetach: 1
m_ThrowSmoothingDuration: 0.25
m_ThrowSmoothingCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_ThrowVelocityScale: 1.5
m_ThrowAngularVelocityScale: 0.25
m_GravityOnDetach: 0
m_RetainTransformParent: 1
hitSounds: {fileID: 11400000, guid: 3b0d719d1a66cdb4ab0e5710ebadff87, type: 2}
speed: 2000
tip: {fileID: 4000395504388414416}
maxLifetimeAfterShot: 60
--- !u!54 &4000395505580036981
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395505580036983}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &4000395505580036982
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4000395505580036983}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5632a3681e626c24baea38ef07ceb759, type: 3}
m_Name:
m_EditorClassIdentifier:
force: 1000

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4c881f575daa4654abb1ef44455a3f70
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,69 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class InputManager : MonoBehaviourPunCallbacks
{
[SerializeField] Movement movement;
[SerializeField] MouseLook mouseLook;
[SerializeField] GameObject menu;
VRFreeControls controls;
VRFreeControls.MovementActions groundMovement;
Vector2 horizontalInput;
Vector2 mouseInput;
private void Awake()
{
controls = new VRFreeControls();
groundMovement = controls.Movement;
groundMovement.HorizontalMovement.performed += ctx => horizontalInput = ctx.ReadValue<Vector2>();
groundMovement.MouseX.performed += ctx => mouseInput.x = ctx.ReadValue<float>();
groundMovement.MouseY.performed += ctx => mouseInput.y = ctx.ReadValue<float>();
controls.Interactions.Action.performed += ctx => StartAction();
controls.Menu.Menu.performed += ctx => OpenMenu();
if (!photonView.IsMine)
{
controls.Disable();
}
}
private void Update()
{
if (photonView.IsMine)
{
movement.ReceiveInput(horizontalInput);
mouseLook.ReceiveInput(mouseInput);
}
}
void OpenMenu()
{
menu.SetActive(!menu.activeInHierarchy);
}
void StartAction()
{
mouseLook.Action();
}
private void OnEnable()
{
controls.Enable();
}
private void OnDisable()
{
controls.Disable();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f083d01adfb06e144adb77b83cae8452
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,79 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class MouseLook : MonoBehaviourPunCallbacks
{
[SerializeField] float sensitivityX = 5f;
[SerializeField] float sensitivityY = 5f;
float mouseX, mouseY;
[SerializeField] Transform playerCamera;
[SerializeField] float xClamp = 85f;
float xRotation = 0f;
[SerializeField] GameObject plcamera;
[SerializeField] LayerMask layerMask;
private void Awake()
{
if(!photonView.IsMine)
{
plcamera.SetActive(false);
}
//Cursor.lockState = CursorLockMode.Locked;
}
private void Update()
{
transform.Rotate(Vector3.up, mouseX * Time.deltaTime);
xRotation -= mouseY;
xRotation = Mathf.Clamp(xRotation, -xClamp, xClamp);
Vector3 targetRotation = transform.eulerAngles;
targetRotation.x = xRotation;
playerCamera.eulerAngles = targetRotation;
RaycastHit hit;
if (Physics.Raycast(playerCamera.position, transform.TransformDirection(Vector3.forward), out hit, 1f, layerMask))
{
Debug.LogWarning(hit.transform.name);
if (hit.transform.gameObject.name == "VR-door")
{
GameObject door = hit.transform.gameObject;
int direction = 0;
if (playerCamera.position.z - door.transform.position.z < 0) direction = -1;
else direction = 1;
door.GetComponent<Rigidbody>().AddForce(transform.TransformDirection(Vector3.forward) * 10f);
}
}
}
public void Action()
{
Debug.Log("ACTION");
RaycastHit actionHit;
if (Physics.Raycast(playerCamera.position, transform.TransformDirection(Vector3.forward), out actionHit, 1f))
{
if(actionHit.transform.gameObject.tag == "Treasure")
{
Debug.Log("OBJECT FOUND");
actionHit.transform.GetComponent<TreasureObject>().CollectedPun();
}
}
}
public void ReceiveInput (Vector2 mouseInput)
{
mouseX = mouseInput.x * sensitivityX;
mouseY = mouseInput.y * sensitivityY;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 83987ed2fa3e78f469c7acbb131e6add
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour
{
[SerializeField] CharacterController controller;
[SerializeField] float speed = 10f;
Vector2 horizontalInput;
private void Update()
{
Vector3 horizontalVelocity = (transform.right * horizontalInput.x + transform.forward * horizontalInput.y) * speed;
controller.Move(horizontalVelocity * Time.deltaTime);
controller.Move(new Vector3(0f, -9f, 0f));
}
public void ReceiveInput (Vector2 _horizontalInput)
{
horizontalInput = _horizontalInput;
}
private void OnCollisionEnter(Collision collision)
{
if (collision.collider.tag == "Door")
{
Debug.Log("DOOR COLLISION");
collision.gameObject.GetComponent<Rigidbody>().AddRelativeForce(new Vector3(0f, 0f, 20f));
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6bb47ef085cf37045b8a3186127936a0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,318 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1746472484619960418
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1746472484619960421}
- component: {fileID: 1746472484619960422}
- component: {fileID: 1746472484619960423}
- component: {fileID: 1746472484619960420}
m_Layer: 31
m_Name: Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1746472484619960421
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472484619960418}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.473, z: 0.046}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1746472485420521338}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &1746472484619960422
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472484619960418}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!81 &1746472484619960423
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472484619960418}
m_Enabled: 1
--- !u!114 &1746472484619960420
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472484619960418}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2
--- !u!1 &1746472484646979795
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1746472484646979794}
- component: {fileID: 1746472484646979796}
- component: {fileID: 1746472484646979797}
m_Layer: 31
m_Name: Capsule
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1746472484646979794
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472484646979795}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.9, z: 0.5}
m_Children: []
m_Father: {fileID: 1746472485420521338}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1746472484646979796
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472484646979795}
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1746472484646979797
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472484646979795}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1746472485420521336
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1746472485420521338}
- component: {fileID: 1746472485420521339}
- component: {fileID: 1746472485420521343}
- component: {fileID: 1746472485420521340}
- component: {fileID: 1746472485420521341}
- component: {fileID: 8390347115590538587}
m_Layer: 31
m_Name: Player_VRFree
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1746472485420521338
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472485420521336}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -78.139, y: 5.931, z: -12.817}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1746472484646979794}
- {fileID: 1746472484619960421}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!143 &1746472485420521339
CharacterController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472485420521336}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Height: 1.8
m_Radius: 0.25
m_SlopeLimit: 45
m_StepOffset: 0.3
m_SkinWidth: 0.08
m_MinMoveDistance: 0.001
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &1746472485420521343
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472485420521336}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f083d01adfb06e144adb77b83cae8452, type: 3}
m_Name:
m_EditorClassIdentifier:
movement: {fileID: 1746472485420521341}
mouseLook: {fileID: 1746472485420521340}
--- !u!114 &1746472485420521340
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472485420521336}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83987ed2fa3e78f469c7acbb131e6add, type: 3}
m_Name:
m_EditorClassIdentifier:
sensitivityX: 10
sensitivityY: 0.1
playerCamera: {fileID: 1746472484619960421}
xClamp: 85
plcamera: {fileID: 1746472484619960418}
layerMask:
serializedVersion: 2
m_Bits: 2147483648
--- !u!114 &1746472485420521341
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472485420521336}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6bb47ef085cf37045b8a3186127936a0, type: 3}
m_Name:
m_EditorClassIdentifier:
controller: {fileID: 1746472485420521339}
speed: 10
--- !u!54 &8390347115590538587
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746472485420521336}
serializedVersion: 2
m_Mass: 50
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 80
m_CollisionDetection: 1

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 91cc6f86cdfa008488dec56d3eceb7c7
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,24 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class VRFreeController_Network : MonoBehaviour
{
private PhotonView photonView;
public GameObject player;
private void Start()
{
photonView = GetComponent<PhotonView>();
}
private void Update()
{
if (photonView.IsMine)
{
player.SetActive(false);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: de95f418815b0d94cb3315517abd64f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,387 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.1.0
// from Assets/VR_free/VRFreeControls.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public partial class @VRFreeControls : IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @VRFreeControls()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""VRFreeControls"",
""maps"": [
{
""name"": ""Movement"",
""id"": ""5aa1bea5-8e51-429b-a37a-80352b276bf7"",
""actions"": [
{
""name"": ""HorizontalMovement"",
""type"": ""PassThrough"",
""id"": ""f97735dd-1abd-480e-9f67-266934f7afa1"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""MouseX"",
""type"": ""PassThrough"",
""id"": ""d647215f-5dc5-4a03-b94a-b70655336a37"",
""expectedControlType"": ""Axis"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""MouseY"",
""type"": ""PassThrough"",
""id"": ""632dcd46-7136-4125-995e-a6b211aa4f75"",
""expectedControlType"": ""Axis"",
""processors"": """",
""interactions"": """"
}
],
""bindings"": [
{
""name"": ""WASD"",
""id"": ""92e323d8-060f-4656-95df-ddbbf9879129"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""HorizontalMovement"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""c6320587-dcd6-4262-ac0a-e3d126a31cc0"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""HorizontalMovement"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""a48c1817-3be8-490a-97d2-28ed1fc2757a"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""HorizontalMovement"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""610938fb-fe5b-4aa0-a868-509db8bbc6fc"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""HorizontalMovement"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""c72c3a7e-e238-48d7-a57f-076f73edd9f8"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""HorizontalMovement"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""713d7d47-83a3-477e-8a77-fb21750b137d"",
""path"": ""<Mouse>/delta/x"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""MouseX"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""bb76240c-8915-44dd-b74a-9b1b9b455c0b"",
""path"": ""<Mouse>/delta/y"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""MouseY"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Interactions"",
""id"": ""41bdddec-7008-41f1-96e1-e5c57346ccca"",
""actions"": [
{
""name"": ""Action"",
""type"": ""Button"",
""id"": ""8eec87ad-14a3-4734-9064-6ed2922c0680"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
}
],
""bindings"": [
{
""name"": """",
""id"": ""443d23b1-0e5d-4e40-9b21-9e536cf36b33"",
""path"": ""<Mouse>/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Action"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Menu"",
""id"": ""59016d8e-ce15-4697-8419-195041bc8960"",
""actions"": [
{
""name"": ""Menu"",
""type"": ""Button"",
""id"": ""59dc31df-24e0-4f50-a92c-7801f502472b"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
}
],
""bindings"": [
{
""name"": """",
""id"": ""27735871-8fc4-41e1-ac79-ba61b52fc201"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Menu"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// Movement
m_Movement = asset.FindActionMap("Movement", throwIfNotFound: true);
m_Movement_HorizontalMovement = m_Movement.FindAction("HorizontalMovement", throwIfNotFound: true);
m_Movement_MouseX = m_Movement.FindAction("MouseX", throwIfNotFound: true);
m_Movement_MouseY = m_Movement.FindAction("MouseY", throwIfNotFound: true);
// Interactions
m_Interactions = asset.FindActionMap("Interactions", throwIfNotFound: true);
m_Interactions_Action = m_Interactions.FindAction("Action", throwIfNotFound: true);
// Menu
m_Menu = asset.FindActionMap("Menu", throwIfNotFound: true);
m_Menu_Menu = m_Menu.FindAction("Menu", throwIfNotFound: true);
}
public void Dispose()
{
UnityEngine.Object.Destroy(asset);
}
public InputBinding? bindingMask
{
get => asset.bindingMask;
set => asset.bindingMask = value;
}
public ReadOnlyArray<InputDevice>? devices
{
get => asset.devices;
set => asset.devices = value;
}
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
public bool Contains(InputAction action)
{
return asset.Contains(action);
}
public IEnumerator<InputAction> GetEnumerator()
{
return asset.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public void Enable()
{
asset.Enable();
}
public void Disable()
{
asset.Disable();
}
public IEnumerable<InputBinding> bindings => asset.bindings;
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
{
return asset.FindAction(actionNameOrId, throwIfNotFound);
}
public int FindBinding(InputBinding bindingMask, out InputAction action)
{
return asset.FindBinding(bindingMask, out action);
}
// Movement
private readonly InputActionMap m_Movement;
private IMovementActions m_MovementActionsCallbackInterface;
private readonly InputAction m_Movement_HorizontalMovement;
private readonly InputAction m_Movement_MouseX;
private readonly InputAction m_Movement_MouseY;
public struct MovementActions
{
private @VRFreeControls m_Wrapper;
public MovementActions(@VRFreeControls wrapper) { m_Wrapper = wrapper; }
public InputAction @HorizontalMovement => m_Wrapper.m_Movement_HorizontalMovement;
public InputAction @MouseX => m_Wrapper.m_Movement_MouseX;
public InputAction @MouseY => m_Wrapper.m_Movement_MouseY;
public InputActionMap Get() { return m_Wrapper.m_Movement; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(MovementActions set) { return set.Get(); }
public void SetCallbacks(IMovementActions instance)
{
if (m_Wrapper.m_MovementActionsCallbackInterface != null)
{
@HorizontalMovement.started -= m_Wrapper.m_MovementActionsCallbackInterface.OnHorizontalMovement;
@HorizontalMovement.performed -= m_Wrapper.m_MovementActionsCallbackInterface.OnHorizontalMovement;
@HorizontalMovement.canceled -= m_Wrapper.m_MovementActionsCallbackInterface.OnHorizontalMovement;
@MouseX.started -= m_Wrapper.m_MovementActionsCallbackInterface.OnMouseX;
@MouseX.performed -= m_Wrapper.m_MovementActionsCallbackInterface.OnMouseX;
@MouseX.canceled -= m_Wrapper.m_MovementActionsCallbackInterface.OnMouseX;
@MouseY.started -= m_Wrapper.m_MovementActionsCallbackInterface.OnMouseY;
@MouseY.performed -= m_Wrapper.m_MovementActionsCallbackInterface.OnMouseY;
@MouseY.canceled -= m_Wrapper.m_MovementActionsCallbackInterface.OnMouseY;
}
m_Wrapper.m_MovementActionsCallbackInterface = instance;
if (instance != null)
{
@HorizontalMovement.started += instance.OnHorizontalMovement;
@HorizontalMovement.performed += instance.OnHorizontalMovement;
@HorizontalMovement.canceled += instance.OnHorizontalMovement;
@MouseX.started += instance.OnMouseX;
@MouseX.performed += instance.OnMouseX;
@MouseX.canceled += instance.OnMouseX;
@MouseY.started += instance.OnMouseY;
@MouseY.performed += instance.OnMouseY;
@MouseY.canceled += instance.OnMouseY;
}
}
}
public MovementActions @Movement => new MovementActions(this);
// Interactions
private readonly InputActionMap m_Interactions;
private IInteractionsActions m_InteractionsActionsCallbackInterface;
private readonly InputAction m_Interactions_Action;
public struct InteractionsActions
{
private @VRFreeControls m_Wrapper;
public InteractionsActions(@VRFreeControls wrapper) { m_Wrapper = wrapper; }
public InputAction @Action => m_Wrapper.m_Interactions_Action;
public InputActionMap Get() { return m_Wrapper.m_Interactions; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(InteractionsActions set) { return set.Get(); }
public void SetCallbacks(IInteractionsActions instance)
{
if (m_Wrapper.m_InteractionsActionsCallbackInterface != null)
{
@Action.started -= m_Wrapper.m_InteractionsActionsCallbackInterface.OnAction;
@Action.performed -= m_Wrapper.m_InteractionsActionsCallbackInterface.OnAction;
@Action.canceled -= m_Wrapper.m_InteractionsActionsCallbackInterface.OnAction;
}
m_Wrapper.m_InteractionsActionsCallbackInterface = instance;
if (instance != null)
{
@Action.started += instance.OnAction;
@Action.performed += instance.OnAction;
@Action.canceled += instance.OnAction;
}
}
}
public InteractionsActions @Interactions => new InteractionsActions(this);
// Menu
private readonly InputActionMap m_Menu;
private IMenuActions m_MenuActionsCallbackInterface;
private readonly InputAction m_Menu_Menu;
public struct MenuActions
{
private @VRFreeControls m_Wrapper;
public MenuActions(@VRFreeControls wrapper) { m_Wrapper = wrapper; }
public InputAction @Menu => m_Wrapper.m_Menu_Menu;
public InputActionMap Get() { return m_Wrapper.m_Menu; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(MenuActions set) { return set.Get(); }
public void SetCallbacks(IMenuActions instance)
{
if (m_Wrapper.m_MenuActionsCallbackInterface != null)
{
@Menu.started -= m_Wrapper.m_MenuActionsCallbackInterface.OnMenu;
@Menu.performed -= m_Wrapper.m_MenuActionsCallbackInterface.OnMenu;
@Menu.canceled -= m_Wrapper.m_MenuActionsCallbackInterface.OnMenu;
}
m_Wrapper.m_MenuActionsCallbackInterface = instance;
if (instance != null)
{
@Menu.started += instance.OnMenu;
@Menu.performed += instance.OnMenu;
@Menu.canceled += instance.OnMenu;
}
}
}
public MenuActions @Menu => new MenuActions(this);
public interface IMovementActions
{
void OnHorizontalMovement(InputAction.CallbackContext context);
void OnMouseX(InputAction.CallbackContext context);
void OnMouseY(InputAction.CallbackContext context);
}
public interface IInteractionsActions
{
void OnAction(InputAction.CallbackContext context);
}
public interface IMenuActions
{
void OnMenu(InputAction.CallbackContext context);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6852cecffb77d284f8be97664f62e123
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,169 @@
{
"name": "VRFreeControls",
"maps": [
{
"name": "Movement",
"id": "5aa1bea5-8e51-429b-a37a-80352b276bf7",
"actions": [
{
"name": "HorizontalMovement",
"type": "PassThrough",
"id": "f97735dd-1abd-480e-9f67-266934f7afa1",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "MouseX",
"type": "PassThrough",
"id": "d647215f-5dc5-4a03-b94a-b70655336a37",
"expectedControlType": "Axis",
"processors": "",
"interactions": ""
},
{
"name": "MouseY",
"type": "PassThrough",
"id": "632dcd46-7136-4125-995e-a6b211aa4f75",
"expectedControlType": "Axis",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "WASD",
"id": "92e323d8-060f-4656-95df-ddbbf9879129",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "HorizontalMovement",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "c6320587-dcd6-4262-ac0a-e3d126a31cc0",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "",
"action": "HorizontalMovement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "a48c1817-3be8-490a-97d2-28ed1fc2757a",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "",
"action": "HorizontalMovement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "610938fb-fe5b-4aa0-a868-509db8bbc6fc",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "",
"action": "HorizontalMovement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "c72c3a7e-e238-48d7-a57f-076f73edd9f8",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "",
"action": "HorizontalMovement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "713d7d47-83a3-477e-8a77-fb21750b137d",
"path": "<Mouse>/delta/x",
"interactions": "",
"processors": "",
"groups": "",
"action": "MouseX",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "bb76240c-8915-44dd-b74a-9b1b9b455c0b",
"path": "<Mouse>/delta/y",
"interactions": "",
"processors": "",
"groups": "",
"action": "MouseY",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "Interactions",
"id": "41bdddec-7008-41f1-96e1-e5c57346ccca",
"actions": [
{
"name": "Action",
"type": "Button",
"id": "8eec87ad-14a3-4734-9064-6ed2922c0680",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "",
"id": "443d23b1-0e5d-4e40-9b21-9e536cf36b33",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": "",
"action": "Action",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "Menu",
"id": "59016d8e-ce15-4697-8419-195041bc8960",
"actions": [
{
"name": "Menu",
"type": "Button",
"id": "59dc31df-24e0-4f50-a92c-7801f502472b",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"name": "",
"id": "27735871-8fc4-41e1-ac79-ba61b52fc201",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
"groups": "",
"action": "Menu",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": []
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 24473829e055f344885de219a650c89d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 1
wrapperCodePath:
wrapperClassName:
wrapperCodeNamespace:

View File

@@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class arrowSpawn : MonoBehaviour
{
public float force = 1000f;
// Start is called before the first frame update
void Start()
{
this.GetComponent<Rigidbody>().AddRelativeForce(new Vector3(0f, 0f, force));
StartCoroutine(Despawn());
}
// Update is called once per frame
void Update()
{
transform.rotation = Quaternion.LookRotation(Vector3.forward, this.GetComponent<Rigidbody>().velocity);
}
IEnumerator Despawn()
{
Debug.Log(this.GetComponent<Rigidbody>().velocity);
yield return new WaitForSeconds(5f);
Debug.Log(this.GetComponent<Rigidbody>().velocity);
Destroy(this.gameObject);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5632a3681e626c24baea38ef07ceb759
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: