[UE4] AI Move Toは、突然の変化を解決し、方向転換するときにスムーズに移行するための方法です(C ++を含む)
Ai Move Is Method
目次
AIキャラクタークラスのコンストラクターで、次のパラメーターを変更します
//Make AI rotate smoothly(avoid snapping) bUseControllerRotationYaw = false //prepare for orient rotation to movement GetCharacterMovement()->bOrientRotationToMovement = true float YawRotateRate = 360.f GetCharacterMovement()->RotationRate = FRotator(0, 0, YawRotateRate)
使用に注意してください GetCharacterMovement 関数、次のヘッダーファイルを追加する必要があります
#include 'GameFramework/CharacterMovementComponent.h'