본문 바로가기

프로그래밍48

C++ 입력 출력 (cin, cout) 관련 123456789101112131415161718192021//공백( 스페이스바, 엔터) 등과같은 것으로 문자가 끝어져서 받아진다. // 입력 : this cin str; // 출력 : this char str[128]; cin >> str; cout 2016. 5. 10.
UE4 두백터를 이용한 방향(Direction)과 회전 Angle 구하는 코드 123456789101112131415161718192021222324252627282930313233 FVector Dest = FVector(GoalPosition.X, GoalPosition.Y, 0.0f); FVector Start = FVector(GetTransform().GetLocation().X, GetTransform().GetLocation().Y, 0.0f); FVector dir = Dest - Start; GoalDirection = dir.SafeNormal(); //노말라이징한 두개의 백터를 dot한다. //여기서 축을 Z축으로 하기 위해 두백터의 Z값을 0.0f로 넣어 주었다. float dot = FVector::DotProduct(FVector::ForwardVector.. 2016. 4. 20.
현재 레벨에 있는 다른 Actor의 C++클래스 연결하기. 기본 적인 방법123456789101112131415161718192021222324252627//받아올 클래스 static AStageFloor* stagefloor = nullptr; //현재 래벨에 존재하는 모든 액터를 가져온다. TTransArray actors = GetWorld()->GetCurrentLevel()->Actors; for (int i = 0; i FindComponentByClass(); //만약 USceneComponent를 RootComponent 검색해서 있다면 연결하고. if (root) { //열결한 Root(USceneComponent)가 StageFloor를 Tag로 가지고 있다면 if (root->ComponentHasTag("StageFloor")) { //현재.. 2016. 4. 20.
언리얼 C++ 컨텐츠 브라우저에서 제거 하는법 1. 먼저 VS에서 .cpp와 .h 를 지운다.2. 탐색기 에서도 지운다.3. VS에서 솔루션 빌드를 한다. (ctrl + shift + b ) //여기까지 하면 아직 컨텐츠에는 남아 있다. 4. 마지막으로 언리얼을 껏다가 다시 키면 컨텐츠 브라우저 에서 지워져 있다. 2016. 4. 19.