분류 전체보기 127

젯슨나노 세팅 2

https://ashen99.tistory.com/52 우분투 세팅 1 1. 가상환경 세팅 https://www.vmware.com/kr/products/workstation-player.html VMware Workstation Player | VMware VMware Workstation Player allows you to safely run a second, isolated operating system on a single PC. Learn more. www.vmware.com 기본세 ashen99.tistory.com 인터넷 브라우저에 nvidia jetpack download 를 검색해주세요 우분투 설치하면 파이어폭스가 기본적으로 깔려있어요 이메일을 입력하세요. 가입되어있지 않다면 가입해주시..

FurBall의 탈출기

https://assetstore.unity.com/packages/2d/characters/furball-2d-v1-2-mobile-optimized-40588 FurBall 2D V1.2 mobile optimized | 2D 캐릭터 | Unity Asset Store Elevate your workflow with the FurBall 2D V1.2 mobile optimized asset from Illustraktion. Find this & more 캐릭터 on the Unity Asset Store. assetstore.unity.com 귀여워서 이 애셋으로 만들거에요 사용할 오브젝트를 꺼내봤어요. -게임 내용은 발판밟고 올라가서 갇혀있는 친구 구하기 입니다. - Add 콜라이더 카메라랑 플..

UNITY/Unity Study 2023.08.23

화살피하기 Unity 2D

부엉이가 화살피하는 2D 게임을 만들거에요. 먼저 사용할 오브젝트를 꺼내주세요. 배경은 레이어 0, 부엉이랑 화살은 1로 할게 부엉이가 오른쪽 화살표를 누르면 오른쪽으로, 왼쪽화살표는 왼쪽으로 움직이게 하는 스크립트(OwlController.cs)를 부엉이 오브젝트에 추가해주세요 using System.Collections; using System.Collections.Generic; using UnityEngine; public class OwlController : MonoBehaviour { // Start is called before the first frame update void Start() { Application.targetFrameRate = 60; } // Update is call..

UNITY/Unity Study 2023.08.22

목적지까지 자동차 움직이기 Unity

사용할 객체를 인스펙터창에 옮겨주세요. 2D는 레이어 값이 높을 수록 위에 나타납니다. 예를 들어 도로의 레이어 값이 0이라면 도착지가 1, 자동차는 2로 해주세요 CarController.cs를 만들어 자동차에 넣어주세요 using System.Collections; using System.Collections.Generic; using UnityEngine; public class CarController : MonoBehaviour { float speed = 0; Vector2 startPos; // Start is called before the first frame update void Start() { Application.targetFrameRate = 60; } // Update is c..

UNITY/Unity Study 2023.08.21

유니티 문법

사용해본것 동작 순서 1. Awake : 씬이 로드될 때 씬의 각 오브젝트에 대해 호출됩니다. Start보다 먼저 동작합니다. 2. Start : 첫 프레임이나 오브젝트의 물리 업데이트 전에 호출됩니다. 3. Update : Start 이후에 매 프레임마다 반복 실행 4.LateUpdate : Update 함수에 이어서 호출되는 함수 정기 업데이트 이벤트 Update 함수는 프레임이 렌더링되기 전에 호출되고 애니메이션이 계산되기 전에도 호출됩니다. void Update() { float distance = speed * Time.deltaTime * Input.GetAxis("Horizontal"); transform.Translate(Vector3.right * distance); } * Time.de..

UNITY/Unity Study 2023.08.19

벡터 사이의 거리 구하기

위치가 변할 떄 void Update(){ // 위치 업데이트 Vector3 pos = transform.position; Vector3 dis = prevPos - pos; playerSc.newHP -= hp * dis.magnitude; prevPos = pos; } 값이 주어질 때 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class Something : MonoBehaviour { void Start() { float distance = GetDistence(2, 2, 5, 6); Debug.Log("(2,2)에서 (5,6)까지의 거리 : " + distance..

UNITY/Unity Study 2023.08.19

박스미는 만큼 HP 깎기

플레이어가 물체를 옮기는 만큼 HP가 깎이도록 만들거에요 나무박스는 1m에 -1HP, 금속박스는 1m에 -2HP HP는 UI로 보여줄 거에요 바닦, 큐브2개, 캡슐(플레이어) 하나를 준비해 주세요 잘 보이게 객체에 색을 입혀줄게요 프로젝트에서 우클릭 > Credat > Meterial 색일 지정해 주시고 나무는 Metalli과 Smoothness를 낮게, 금속 상자는 높게 설정해주세요 플레이어에 newHP넣고 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player : MonoBehaviour { public float newHP = 100; void Update() { float h ..

UNITY/Unity Study 2023.08.19

PlayerMovment

플레이어 움직이는 코드 // WSAD누르는 방향으로 speed 힘이 작용함 // speed는 유니티에서 변경 가능(public) using System.Collections; using System.Collections.Generic; using UnityEngine; public class WSADGetKey : MonoBehaviour { public float speed = 10f; public Rigidbody playerRigidbody; // Start is called before the first frame update // 프레임당 한번 실행 // Update is called once per frame void Update() { //유저입력 if(Input.GetKey(KeyCode...

UNITY 2023.08.18