GameChoi
Choi Programming
GameChoi
전체 방문자
오늘
어제
  • 분류 전체보기 (468)
    • C++ Algorithm & Study (184)
      • C++ & Algorithm Strategies (45)
      • Game Math & DirectX 11 (72)
      • Server + UE5 (29)
      • Lyra Clone Coding (37)
    • Create Game (284)
      • [Window API] Game Client & .. (55)
      • [DirectX] DirectX 2D & 3D (155)
      • [UE5] BLUEPRINT & C++ (74)
    • odds and ends (0)
      • English (0)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • c++
  • Other Character
  • Game Server
  • UE5
  • protobuf
  • Player State
  • GAME Client
  • Destination Move Packet
  • Direct11
  • Network Worker
  • core
  • server
  • Player Move Packet
  • session
  • RPG Game
  • Direct3D
  • Game Room
  • client
  • job queue
  • Algorithm Strategies

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
GameChoi

Choi Programming

[UE5] 11 - Attack
Create Game/[UE5] BLUEPRINT & C++

[UE5] 11 - Attack

2022. 12. 5. 20:19
  • Weapon Attack

1. 공격 범위 설정

     - Box Collision Create

     - start, end 위치를 만든 후 두 위치를 Trace

Box Trace
Attack

2. 공격 시 활성화

     - Attack Montage 수정 및 Animation 수정

Attack Montage
Animation

3. Enemy Create

     - Mixamo Character 사용

     - 사용시 Mixamo Character는 skeletal에 root bone이 없으므로 blender을 이용해 추가

           - blender Mixamo 사용

     - Hit Animation Montage Create

Hit Animation

     - Enemy Animation Create

Enemy Animation

4. Enemy에게 Hit을 넘기기 위한 Interface Create

Hit Interface

     - Weapon에 맞은 Hit Actor Get Hit 실행

           - Cast 사용

Cast to HitInterface
Attack

5. Attack Direction

     - From Front (-45 < theta < 45)

     - From Left (-135 < theta < -45)

     - From Back (-135 < theta < 135)

     - From Right (45 < theta < 135)

     - 공격한 지점과 적의 방향벡터를 사용해 theta를 구함

           - 공격한 지점과 적의 방향 벡터를 빼서 정규화

           - A dot B 하면 cos(theta)가 나오므로 acos(cos(theta))를 하면 theta 값이 나옴

           - A와 B의 외적을 구하고 언리얼엔진이 오른손 법칙이 아닌 왼손 법칙을 사용하기 떄문에 -1을 곱해줌

Green - 공격 지점, Red - 적의 방향 벡터, Blue - 두 점의 외적

6. 여러번 공격 못하게 막기

     - 무기 및 공격한 적 배열에 넣음

Ignore Actor
Ignore Actor 추가

7. Sound & Particle Create

     - Meta Sound Create and Attenuation Create

Attenuation
Play Sound

     - Spawn Emitter at Location

Spawn Emitter at Location

'Create Game > [UE5] BLUEPRINT & C++' 카테고리의 다른 글

[UE5] 13 - Combat System #1  (0) 2022.12.09
[UE5] 12 - Breakable  (0) 2022.12.07
[UE5] 10 - Weapon2  (0) 2022.12.02
[UE5] 9 - Sound  (0) 2022.12.02
[UE5] 8 - Animation Montage  (0) 2022.12.02
    'Create Game/[UE5] BLUEPRINT & C++' 카테고리의 다른 글
    • [UE5] 13 - Combat System #1
    • [UE5] 12 - Breakable
    • [UE5] 10 - Weapon2
    • [UE5] 9 - Sound
    GameChoi
    GameChoi

    티스토리툴바