⭐ Unreal Engine/UE RPG Blueprint

[UE] Targeting, 내적과 외적

Designerd 2023. 2. 8. 09:03

 

 

목차

 

 


 

 

ABP: Animation Blueprint
AN: Blueprint Class AnimNotify
ANS: Blueprint Class - AnimNotifyState

AO: Aim Offset

BP: Blueprint Class
BS: Blend Space

BF: Blueprint Function Library
CS: Matinee Camera Shake
E: Enum 열거형
DT: Data Table
F: 구조체

I: Blueprint Interface

WB: Widget Bluepprint

 

UE2212_02

  Level - LEVEL
ABP_Player
BP_GameMode
BF_Helper
IDamage
 
AdvancedMagicFX12
Materials  
Meshes  
Particles  
Textures  
Character Animation Bow
Common
Fist
Hammer
Parkour
Sword
Unarmed
Wizard
BlendSpaces BS_Bow
BS_Fist
BS_Hammer
BS_Sword

BS_Unarmed
BS_Wizard
Materials

MaterialLayers
M_UE4Man_Body
M_UE4Man_ChestLogo
Mesh SK_Mannequin
SK_MAnnequin_PhysicsAsset
Skel_Mannequin

Montages
Around Around_Montage
Bow AR_DrawBow_Montage
AR_ShootAndDraw_Montage
Common HitReaction_Move_Montage
HitReaction_Stop_Montage
Fist Fist_Attack_1_Montage
Fist_Attack_2_Montage
Fist_Attack_3_Montage
Fist_Hitted_Montage
Hammer Frank_RPG_2Hand_Combo01_1_Montage
Frank_RPG_2Hand_Combo01_2_Montage
Frank_RPG_2Hand_Combo01_3_Montage
Frank_RPG_2Hand_Combo01_4_Montage
Sword Draw_Sword_Montage
Sword_Attack_1_Montage
Sword_Attack_2_Montage
Sword_Attack_3_Montage
Warp Warp_Montage
Enemy_DeadFall_Montage
HitReaction_Montage
 
Textures UE4_LOGO_CARD
UE4_Mannequin__normals
UE4_Mannequin_MAT_MASKA
UE4Man_Logo_N
Weapons Elven Bow
Greate Hammer
Sword
Component EStateType
MovingComponent
StateComponent
WeaponComponent
FeetComponent
TargetComponent
   
Effects P_Cube_Mesh_Test
P_Genno_Weapon_Lightning_01
   
Enemies BP_Enemy    
Environment
Materials Textures  
Meshes    
Obstacle    
InfinityBladeEffects
Effects
FX_Combat_Base  
FX_Materials  
FX_Meshes  
FX_Monsters  
FX_Textures  
FX_Textures_IB  
Masters  
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 ANS_Equip
ANS_Combo
ANS_Collision
AN_BeginAction
AN_EndAction
AN_CameraShake
   
Player BP_Player
FZoomData
   
Sounds S_BGM
S_HitPunch
S_OneHand_Hit
   
Textures Crosshair    

 
Weapons
Around Around_FireBall
Around_FireBall1
Around_IceBall
Around_IceBall1
DT_DoAction_Around
DT_Equip_Around
DT_HitData_Around
Skill_Around
Weapon_Around
 
Bow AO_Aim
Curve_Aim
DT_DoAction_Bow

DT_Equip_Bow
DT_HitData_Bow
FAimData
Skill_Aim
Skill_Arrow
Weapon_Bow

 
FireBall DT_DoAction_FireBall
DT_Equip_FireBall
DT_HitData_FireBall

Skill_FireBall
Weapon_FireBall
 
Fist Combo_Fist - Blueprint Class Actor Weapon_Combo 상속
CS_Fist
DT_DoAction_Fist

DT_Equip_Fist
DT_HitData_Fist
 
Hammer Combo_Fist - Blueprint Class Actor Weapon_Combo 상속
CS_Hammer
DT_DoAction_Hammer
DT_Equip_Hammer
DT_HitData_Hammer

 
Sword Combo_Sword - Blueprint Class Actor Weapon_Combo 상속
CS_Sword
DT_DoAction_Sword
DT_Equip_Sword
DT_HitData_Sword
 
Warp Weapon_Warp -  Blueprint Class Actor Weapon 상속
DT_DoAction_Warp

DT_Equip_Warp
 
EWeaponType
FDoActionData
FEquipData
FHitData
Weapon - Blueprint Class Actor
Weapon_Combo - Blueprint Class Actor Weapon 상속
M_Weapon
Skill
   
Widget WB_CrossHair    

 

 

 

 

 

Targeting

 

 


 

 

 

내적과 외적이 같이 쓰이는 경우는?

  •  

 

D3DMatrixLookAtLH

 

 

IA -> VS -> RS -> PS -> OM

  •  RS: 3d에서2d로 변환하는 과정을 갖는다. Culling 과정 

 

Culling: 3d 공간에서 자름

Clipping: 2d 공간에서 자름

 

수직변의 양이면 앞

수직변이 음이면 뒤

 

외적으로 좌우를 


 

Target Component

 

Event Graph

  • Tick Targeting 노드 추가

 

 

Tick Targeting

확대

  • Character - Get Controller - Set Control Rotation
    • Character 안에 Get Controller는 있지만 Set Control Rotation 없다.
    • 그래서 Get Controller를 먼저 호출한 후에 Set Control Rotation에 연결한다.
    • Owner to Target과 연결
  • Owner to Target = 회전이 완료되어야 하는 값
  • Make Rotator
    • Y(Pitch)값 = Control Rotation의 Y(Pitch)값
    • 위아래는 보간이 안 되도록 만들어준다.

 

  • Current >> Target으로 보간
  • Current = Control Rotation, Target = Make Rotator 값
  • Make Rotator값
    • X (Roll) = Owner To Target X (Roll)
    • Y (Pitch) = Control Rotation X (Roll)
    • Z (Yaw) = Owner To Target Z (Yaw)
  • X, Z는 Control Rotation X, Z에서 Owner To Target X, Z값으로 보간.
  • Y는 Control Rotation Y에서 Control Rotation Y값으로 보간 = 보간 없음.

 


 

실행화면

 

 


 

 

 

 

 

 

 

 

벡터 외적

 

 


 

왼손 좌표계

 

https://hellowoori.tistory.com/38

 

https://blog.naver.com/destiny9720/221411770100


 

BP_Cross 생성

 

Blueprint Class - Actor - BP_Cross 생성

 

 

Get Player Location (pure)

  • Get Player Location (pure) 생성
  • 변수 생성: Player (Static Mesh Actor)

 

 

Get Player to Enemy (pure) 

  • Get Player to Enemy (pure) 생성
  • 변수 생성: Enemy (Static Mesh Actor)

 

 

Event Graph

 


 

 

실행화면