분류 전체보기

    [UE5 C++] TSubclassof<T>

    TSubclassof는 T Class의 Subclass라는 것을 보장하기 위한 것이다. 이렇게 T class의 sub class라는 것을 보장함으로써 UClass 타입의 안정성을 제공한다고 볼 수 있다. TSubclassOf ProjectileClass; 여기서는 AProjectile class의 파생클래스임을 보장해주고 있다. 또한 SpawnActor()를 할 때 우리는 BP를 기반으로한 클래스를 이용하여 Spawn하게 되는데 - 참조 https://docs.unrealengine.com/4.27/ko/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/TSubclassOf/

    [UE5 C++] Unreal 물체 이동과 회전

    void ATank::Move(float Value) { FVector DeltaLocation=FVector::ZeroVector; //X=Value*DeltaTime*Speed DeltaLocation.X=Value*Speed*UGameplayStatics::GetWorldDeltaSeconds(this); AddActorLocalOffset(DeltaLocation,true); } sweep = true , 물체와 충돌했을 때 정지 https://www.unrealengine.com/ko/blog/moving-physical-objects void ATank::Turn(float Value) { FRotator DeltaRotation=FRotator::ZeroRotator; //Yaw = Valu..

    [UE5 C++] Unreal Engine

    언리얼 엔진 변수의 접근성에 대한 지정자는 위 표처럼 정리할 수 있다. Instance는 Instance 객체에서 접근가능한지에 대한 여부이고 Defaults는 객체 그자체에서 접근할 수 있냐에 대한 여부이다.

    [UE5 C++] Unreal Editor 조작법

    마우스 왼쪽 누르고 드래그 -> 앞 뒤 이동 or 회전 =지면과 평평한 수평면 위에서 자유 이동 마우스 오른쪽 드래그 -> 이동x 시점 자유 회전 마우스 왼쪽 오른쪽 같이 -> 화면 평면에서의 자유 이동 f로 물체 focus -> alt 왼클릭 = focus된 물체 기준으로 회전 https://docs.unrealengine.com/4.27/ko/BuildingWorlds/LevelEditor/Viewports/ViewportControls/

    [UE5 C++] Unreal의 Class들

    Unreal에는 여러 C++ Class들이 존재하는데 그 중 대표적인 3가지는 Actor, Pawn, Character가 있다. Actor는 실제 World에 놓을 수 있고 눈으로 볼 수 있게도 할 수 있다. Pawn은 Controller가 빙의를 할 수 있고 입력으로 움직이게도 할 수 있다. Character는 추가적으로 날거나 수영하는 등 추가적인 움직임과 컴포넌트를 갖고 있다. 이렇게 보면 Actor가 가장 상위레벨의 Class같고 Pawn과 Character가 하위레벨의 Class라고 할 수 있다.

    26. Remove Duplicates from Sorted Array

    class Solution { public: int removeDuplicates(vector& nums) { int k =1; int j=nums[0]; vector nums2; nums2.push_back(j); for(int i =1;i

    80. Remove Duplicates from Sorted Array II

    class Solution { public: int removeDuplicates(vector& nums) { int n =nums.size(); if(n

    27. Remove Element

    class Solution { public: int removeElement(vector& nums, int val) { int k=0; vector index; for(auto iter=nums.begin();iter!=nums.end();iter++) { if(*iter!=val) { index.push_back(*iter); k++; } } nums=index; return k; } };

    88. Merge Sorted Array

    class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { for(int i=m;i

    [Runner게임] 개발일지 - 1

    모티브 게임: 쿠키런 쿠키런에서 플레이어의 움직임은 단순하다. 맵 안에서 플레이어는 한 방향으로 달리고 점프할 수 있다. 구현한 것 플레이어 애니메이션 상태 이동 플레이어 점프와 이중 점프 구현(다중점프 제한) public class Player : MonoBehaviour { // Start is called before the first frame update private float h, v; private bool isJumping; private bool isRunning; private int count = 1; [SerializeField]private int Jumppower; private Rigidbody2D rigid; private Animator anim; void Start() ..