Giant vs Human 팀프로젝트 개발일지 31

[Giant vs Human 팀프로젝트/ Photon] 지연 보상

https://doc.photonengine.com/ko-kr/pun/current/gameplay/lagcompensation 지연 보상 | Photon Engine 게임에 물리 객체가있을 때, 특히 두 개 이상의 게임 윈도우가 서로 나란히 있을 때 이러한 객체가 동기화되지 않을 수 있습니다. 이로 인해 게임에 심각한 문제가 발생할 수 있으며 결국 플레이 doc.photonengine.com 네트워크 연결 시 Player와 Master의 네트워크 연결 동기화상태가 일치하지않고 살짝씩 느려서 해결해보고있다. https://devsquare.tistory.com/4 [Tip] 깔끔한 지연 보상의 처리 Photon Pun2 의 튜토리얼 가이드에서 지연보상을 코드로 직접 구현을 하는데 번거로울 뿐더러 깔끔하지..

[Giant vs Human 팀프로젝트] Photon 멀티 동기화

using Photon.Pun; using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameMain : MonoBehaviour { [SerializeField] private List prefabs; private int cnt = 0; // Start is called before the first frame update void Start() { var pool = PhotonNetwork.PrefabPool as DefaultPool; foreach (GameObject prefab in this.prefabs) { pool.ResourceCache.Add(prefab.name, pre..

[Giant vs Human 팀프로젝트, Mobile] 죽은 후 일정 시간 후 리스폰

cube로 죽은 후에 리스폰하는 걸 만들어봤다. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TestRespawn : MonoBehaviour { [SerializeField] private Button btnSuicide; [SerializeField] private GameObject playerGo; [SerializeField] private Slider slider; private bool onRespawn = false; // Start is called before the first frame update void Start() { t..

[Giant vs Human 팀프로젝트, Mobile] 대포가 주변에 있으면 대포발사 버튼이 활성화되고 버튼을 누르면 포탄이 발사

대포 근처에 도달하게되면 공격버튼이 활성화된다. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TestTowerAround : MonoBehaviour { [SerializeField] private Transform towerTr; [SerializeField] private Button btnTowerAttack; [SerializeField] private Transform bulletTr; [SerializeField] private GameObject bulletGo; private void Start() { this.btnTowerAtta..

[Giant vs Human 팀프로젝트, Mobile] 조이스틱을 통한 이동, 버튼을 누르면 공격

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TestJoystickMove : MonoBehaviour { [SerializeField] private VariableJoystick joystick; [SerializeField] private Rigidbody rBody; [SerializeField] private float speed = 3f; [SerializeField] private Button btnAttack; [SerializeField] private GameObject bulletGo; [SerializeField] privat..

[Giant vs Human 팀프로젝트, Meta Quest, VR, Oculus] UI 작업 - 게임시작 시 Start버튼 따라다니기, 남은 거리 보여주기 및 남은 시간 보여주기

그래서 머리가 움직여도 계속 얼굴 앞을 따라다니게 만들어준다. using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; public class TestCountDownDistance : MonoBehaviour { [SerializeField] private Transform giantTr; //거인 위치 [SerializeField] private Transform endTr; // 목적지 [SerializeField] private TMP_Text countDownTxt; //남은시간 [SerializeField] private TMP_Text distanceTxt; //남은거리 [Seriali..

[Giant vs Human 팀프로젝트, Meta Quest, VR, Oculus] Haptic

Haptic 기능에서 이제 추가로 원하는 작업이 무엇이든 닿으면 진동이 울리게하는게 목표였다. Pointaable Unity Event Wrapper로 Select 되었을 때 진동기능을 해주었다. using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestHaptic : MonoBehaviour { public void OnSelect() { this.vibratorSensor(); } private void OnTriggerEnter(Collider other) { this.vibratorSensor(); } private void vibratorSensor() { float primaryI..

[Giant vs Human 팀프로젝트/Meta Quest, VR, Oculus] Haptic feedback(진동)

해야할 것 : GameObject를 만지면 진동이 오게 만든다. 만들기 위해 준비할 것 1. GameObject Cube를 만들어준다. 2. Cube에다가 Haptic 시스템을 적용할 Scripts를 넣어준다 .3. Scripts 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestHaptic : MonoBehaviour { public void OnSelect() { float primaryIndexTrigger = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger); float primaryHandTrigger = OVRInput.Get(O..

[Meta Quest, VR, Oculus] VR로 물체를 빠르게 통과하면 통과가 되는 현상 - 2일차

RigidBody랑 Collider가 붙은 Cube를 만들고 잡을 수 있게 Grabbable, Hand Grab Interactable, Physics Grabbable을 추가한 Cube를 가지고 막대기 역할로 큐브를 쳐내는 걸 만들었다. 만든 이유는 대포를 쏘고 막대기로 막았을 때 대포가 막대기를 통과하 는 경우가 있어서 해결해보고자 만들었다. 그래서 AutoHand Demo Scene에서는 어떻게 되고있나 봤더니 별 차이는 없어보였는데 우리가 하고있는 Cube의 Physics Material은 None이고 AutoHand Cube의 Physics Material은 NoFriction이라는 Physics Material이 있어서 그걸로 추가해봤더니 어느정도 괜찮아졌지만 결론적으로 해결이 되지는 않았다...