본문 바로가기
[ Unreal5 ]/- 언리얼엔진5 실습

언리얼엔진5 c++ AIController(LineOfSightTo : 시선방향)

by MRG 2024. 4. 27.
728x90
반응형

 

▣ LineOfSightTo() 함수를 활용하여 시선에 보이면 True로 시선에 있지 않으면 False로 반환하는 함수를 활용하여 조건문을 만들었습니다.

 

▣ LineOfSightTo() : 다른 배우의 중앙과 상단까지 라인을 확인합니다.

 

▣ AAIController::ClearFocus : 지정된 우선순위에 대해 Focus를 지우고 결과적으로 FocalPoint도 지워집니다.

 

▣ AAIController::StopMovement : 컨트롤러가 현재 수행 중인 이동을 중단합니다.

 

https://dev.epicgames.com/documentation/en-us/unreal-engine/BlueprintAPI/Controller/LineOfSightTo?application_version=5.3

 

Line Of Sight To

Line Of Sight To

dev.epicgames.com

 

https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/AIModule/AAIController/ClearFocus?application_version=5.3

 

AAIController::ClearFocus

Clears Focus for given priority, will also clear FocalPoint as a result

dev.epicgames.com

 

https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/AIModule/AAIController/StopMovement?application_version=5.3

 

AAIController::StopMovement

Aborts the move the controller is currently performing

dev.epicgames.com

 

https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/AIModule/AAIController/LineOfSightTo?application_version=5.3

 

AAIController::LineOfSightTo

Checks line to center and top of other actor

dev.epicgames.com

 

 

▣ 저장 및 컴파일 후 플레이를 벽 너머로 플레이어를 움직이면 적 AI가 플레이어를 못 찾고 멈춰 있는 걸 확인할 수 있습니다.

728x90
반응형

댓글