무기에 Collision Capsule을 달아 충돌이 일어나도록 만든다. 공격 몽타주 내에  AnimNotifyState으로 설정한 범위 동안 충돌을 켜서 무기 충돌이 일어나게 만든다.

 

 

목차

     

     


     

     

    Collision

    BP: Blueprint Class

    BS: Blend Space

    ABP: Animation Blueprint

    AN: Blueprint Class AnimNotify

    ANS: Blueprint Class - AnimNotifyState

    01_Blueprints Level - LEVEL
    BP_01_Variable
     
    02_Player 02_Player - LEVEL
    ABP_Player

    BP_Player
     
    03_Vector 03_Vector - LEVEL
    03_Vector_Trace - LEVEL
    BP_03_01_Location
    BP_03_02_Direction
    BP_03_03_Trace
     
    04_Sword BP_Sword  
    05_Collision 05_Collision - LEVEL
    BP_05_01_ActorOverlap
    BP_05_02_ComponentOverlap
    BP_05_03_OverlapAndHit
     
    06_Enemy ABP_Enemy
    BP_Enemy
     
    Character Animation OneHand
    Unarmed
    BlendSpaces BS_Sword        
    BS_Unarmed
    Materials

    MaterialLayers
    M_UE4Man_Body
    M_UE4Man_ChestLogo
    Mesh SK_Mannequin
    SK_MAnnequin_PhysicsAsset
    Skel_Mannequin
    Montages Sword_Attack_1_Montage
    Sword_Attack_2_Montage
    Sword_Attack_3_Montage
    Textures  
    Weapons Sword
    Materials M_Mesh
    M_White_Inst
    M_Red_Inst
    M_Green_Inst
    M_Blue_Inst
    M_UE4Man_Body_Inst
    M_UE4Man_ChesLogo_Inst
     
    Meshes Cone_2
    Cube_2
    Cylinder_2
    Sphere_2
     
    Notifies AN_Begin_Equip
    AN_Begin_Unequip
    AN_Begin_Action
    AN_End_Equip
    AN_End_Unequip
    AN_End_Action
    ANS_Combo
    ANS_Collision
     

     

     


    BP_05_01_ActorOverlap

     

    Event Graph

     

     

     


     

    BP_05_02_ComponentOverlap

     

    Event Graph

     

     


     

    BP_05_03_OverlapAndHit

     

    Event Graph

     

     


     

    BP_Sword

     

    Event Graph

    • Capsule - Collision - Collision Preset - OverlapAllDynamic으로 변경
    • On Component Begin Overlap (Capsule) 캡슐과 부딪히는 물체가 자기 자신이 아니라면 DestroyActor 호출

     

     


     

    05_Collision 레벨 실행화면

     

     

     

     


     

    ANS_Collision 생성

     

    Get Notify Name

     

    Received Notify Begin

     

    Received Notify End

     


     

    Montage에 AN_Collision 노티파이 추가

     

    • Sword_Attack_Montage에 노티파이 트랙 추가 - 노티파이 스테이트 추가 - ANS Collsion 추가

     

     

    Sword_Attack_1_Montage

    Sword_Attack_2_Montage

    Sword_Attack_3_Montage

     

     


     

    BP_Enemy

     

    BP_Player를 복사해서 BP_Enemy 생성

     

    Event Graph

     


     

    ABP_Enemy

     

    ABP_Player를 복사해서 ABP_Enemy 생성

     

    Event Graph

    • 변수 Player 부분을 변수 Enemy로 수정하고 변수 유형을 BP_Enemy로 변경한다.
    • Enemy는 점프, 무기 탈착 기능은 필요 없으므로 해당 기능구현 노드들은 지워준다.

     


     

     

    실행화면

     

     

    '⭐ Unreal Engine > UE RPG Blueprint' 카테고리의 다른 글

    [UE] Enum, Statement Component  (0) 2023.01.10
    [UE] Collision, Retargeting, Mixamo Plugin 설치  (0) 2023.01.09
    [UE] Character Combo  (0) 2023.01.05
    [UE] Character 칼 뽑기, 집어넣기  (0) 2023.01.04
    [UE] Character FSM  (0) 2023.01.02