UE4虚幻,C++脚本控制Actor移动是控制什么

UE4中控制Actor就是控制RootComponent根节点,比如RootComponent根节点下面有USpringArmComponent弹簧臂节点。


USpringArmComponent->GetActorLocation();   //获取弹簧臂节点的Location坐标位置
GetActorLocation();   //获取当前Actor也就是RootComponent根节点的Location坐标位置

如果把USpringArmComponent设置为RootComponent根节点,那么USpringArmComponent->GetActorLocation();   //获取的也是RootComponent根节点的Location坐标位置

SetActorLocation(NewLocation)      //设置当前Actor也就是RootComponent根节点的Location坐标位置

猜你喜欢

转载自blog.csdn.net/qq_39934403/article/details/109001021