Unreal - 파쿠르 벽차기

2025. 11. 3. 00:55·Unreal 프로젝트 다이어리/두번째 프로젝트

이전글과 이어집니다

2025.11.02 - [Unreal5 프로젝트 다이어리2] - Unreal - 파쿠르 볼트(Vault)

 

Unreal - 파쿠르 볼트(Vault)

파쿠르의 볼트 제작입니다 2025.10.31 - [Unreal5 프로젝트 다이어리2] - Unreal - 파쿠르 잡고 올라가기 Unreal - 파쿠르 잡고 올라가기캐릭터의 팔이 닿을수 있는 거리면 난간을 잡고 올라가기 기능을 제

lucodev.tistory.com

 

벽차기의 조건

1. 플레이어와의 거리가 일정거리 충족될때

2. 벽의 콜리전이 직접 설정한 Parkour 프리셋일경우

3. scv파일의 데이터값과 일치할경우

 

bool UCParkourComponent::CanParkour_WallJump()
{
	if (currentParkourState != EParkourState::None)
		return false;

	if (!ownerCharacter->GetCharacterMovement()->IsFalling())
		return false;

	const FParkourDataRow* row = GetParkourData("WallJump");
	if (!row)
		return false;

	if (obstacleHeight >= row->minHeight && obstacleHeight <= row->maxHeight &&
		obstacleWidth >= row->minWidth && obstacleWidth <= row->maxWidth &&
		obstracleDepth >= 5.f && obstracleDepth <= 5000.f &&
		distObstracleUp >= 30 && distObstracleUp <= 80)
		return true;

	return false;
}

void UCParkourComponent::DoParkour_WallJump()
{
	if (!hitObstracle || !ownerCharacter)
		return;

	currentParkourState = EParkourState::WallJump;

	const FParkourDataRow* row = GetParkourData("WallJump");
	if (!row)
		return;

	if (row->playMontage.Num() > 0)
	{
		int32 randIdx = FMath::RandRange(0, row->playMontage.Num() - 1);
		UAnimMontage* selectRandomMontage = row->playMontage[randIdx];
		if (selectRandomMontage)
			ownerCharacter->PlayAnimMontage(selectRandomMontage, row->playRatio);
	}

	FVector jumpVelocity = FVector(0.f, 0.f, wallJumpStrength);
	ownerCharacter->LaunchCharacter(jumpVelocity, true, true);
}

void UCParkourComponent::WallJumpExceptionHandling()
{
	if (currentParkourState == EParkourState::WallJump &&
		!ownerCharacter->GetCharacterMovement()->IsFalling())
	{
		currentParkourState = EParkourState::None;
		EndParkour();
	}
}

WallJumpExceptionHandling은 tickcomponent에서 실행하여주었습니다

구현방법은 간단합니다

이미 전 파쿠르컴포넌트를 통해 방해물을 인식하는 기능과 조건을 다 만들었으니

벽차기는 LaunchCharacter를 사용하여 구현하였습니다

 

결과

'Unreal 프로젝트 다이어리 > 두번째 프로젝트' 카테고리의 다른 글

Unreal - 상호작용(승강기)  (0) 2025.11.12
Unreal - 상호작용(Edge Traversal)  (0) 2025.11.09
Unreal - 파쿠르 볼트(Vault)  (0) 2025.11.02
Unreal - 파쿠르 잡고 올라가기  (0) 2025.10.31
Unreal - CSV 데이터 테이블 만들기  (0) 2025.10.29
'Unreal 프로젝트 다이어리/두번째 프로젝트' 카테고리의 다른 글
  • Unreal - 상호작용(승강기)
  • Unreal - 상호작용(Edge Traversal)
  • Unreal - 파쿠르 볼트(Vault)
  • Unreal - 파쿠르 잡고 올라가기
lucodev
lucodev
언리얼 포폴개발 일기
  • lucodev
    루코 개발테이블
    lucodev
  • 전체
    오늘
    어제
    • 분류 전체보기 (236)
      • Unreal 프로젝트 다이어리 (132)
        • 첫번째 프로젝트 (73)
        • 두번째 프로젝트 (59)
      • Unreal 팁 (8)
      • Unreal 디버깅 (8)
      • C++ 프로그래머스 (52)
        • Stack,Queue (7)
        • Hash (4)
        • Heap (2)
        • Sort (5)
        • Exhaustive search (5)
        • Greedy (2)
        • BFS , DFS (7)
        • Graph (2)
        • Dynamic Programming (1)
        • C++ Math (2)
        • 기타 문제 (14)
      • C++ 백준 (5)
      • C++ 팁 (1)
      • 개인 코테 & 스타디 <비공개> (29)
        • 코드 개인보관함 (9)
        • 코딩테스트+@ (11)
        • 알고리즘 스타디 (6)
        • 알고리즘 스타디 과제 (3)
        • 비공개 (0)
  • 인기 글

  • 최근 글

  • 최근 댓글

  • 링크

  • 공지사항

  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 태그

    언리얼 컷씬
    언리얼 파쿠르
    unreal npc
    unreal 상호작용
    언리얼 behaviortree
    언리얼 상호작용
    언리얼 인터렉션
    언리얼 세키로
    unreal 세키로
    unreal inventory
    언리얼 behavior tree
    언리얼 ui
    unreal 파쿠르
    언리얼
    unreal 인벤토리
    unreal
    언리얼 parkour
    언리얼 비헤이비어트리
    언리얼 인벤토리
    언리얼 시퀀스
  • hELLO· Designed By정상우.v4.10.3
lucodev
Unreal - 파쿠르 벽차기
상단으로

티스토리툴바