2024/09/27 5

Unity 6000.0.20f1 중력(gravity) 전역 설정

Project Settings => Physics => Settings => Shared => GravityGravity를 -9.81로 설정한다. 또한 게임 오브젝트에만 별도의 중력을 설정할 수도 있다.아래 코드와 같이 Rigidbody.useGravity = false 로 설정한다.using UnityEngine;public class CustomGravity : MonoBehaviour{ public Vector3 customGravity = new Vector3(0, -9.81f, 0); private Rigidbody rb; void Start() { rb = GetComponent(); rb.useGravity = false; // Disable d..

Engine/Unity 2024.09.27

유니티 물리 시뮬레이션 : 자유 낙하 (free fall)

테스트한 유니티 엔진 버전 : 6000.0.20f1 유니티 엔진에서 자유 낙하를 보여주려면,일단 바닥을 깔아준다. Hierarchy 상에서 Plane에 해당한다.Sphere를 하나 공중에 띄운다.이 Sphere에는 Sphere Collider와 Rigidbody 컴포넌트를 가지고 있다.Rigidbody에 인스펙터 상으로 옵션이 많은데 우선 기본값으로 테스트를 진행한다.그러면 위 영상과 같이 자유낙하 하는 것을 확인할 수 있었다.끝으로 아래 링크는 이 포스팅에서 사용한 물리 시뮬레이션 프로젝트이다.Scenes 폴더에 FreeFall 을 더블 클릭하면 열어서 직접 테스트 해볼 수 있다. https://github.com/ddayin/Unity-PhysicsSimulation GitHub - ddayin/Un..

유니티 물리 엔진에서 쓰이는 물리학 용어

물리 엔진에 대해서 명확하게 개념을 알고 사용해야 되는데, 그동안은 그 의미를 짐작만 하고 넘어간거 같다.이번 기회에 영어로 된 물리학 용어에 대해서 정리하면서 숙지하고자 한다. 구글 스프레드시트에 Physics 시트에 따로 정리해 두었다.https://docs.google.com/spreadsheets/d/1mmI2hlpUk_ESAU9G-BymjQuuCT2_pFdT3gKHODoYFCg/edit?usp=sharing dev-englishCertainly! The word "either" has several meanings depending on its context. Let's explore them: 1. **Adjective**: - **Definition**: "Either" can be used..

유니티로 물리 시뮬레이션

우선 유니티에서 공식적으로 제공하고 있는 물리 관련 샘플 프로젝트가 있었다.2D라서 조금 아쉽긴 하지만 우선 여기에서부터 시작하면 될듯 하다. https://github.com/Unity-Technologies/PhysicsExamples2D GitHub - Unity-Technologies/PhysicsExamples2D: Examples of various Unity 2D Physics components and features.Examples of various Unity 2D Physics components and features. - Unity-Technologies/PhysicsExamples2Dgithub.com 이제는 유니티 패키지로 따로 설치할 수 있다. https://docs.unit..