struct FVector
{
public:
/** Vector's X component. */
float X;
/** Vector's Y component. */
float Y;
/** Vector's Z component. */
float Z;
}
一些向量常量
/** A zero vector (0,0,0) */
static CORE_API const FVector ZeroVector;
/** One vector (1,1,1) */
static CORE_API const FVector OneVector;
/** Unreal up vector (0,0,1) */
static CORE_API const FVector UpVector;
/** Unreal down vector (0,0,-1) */
static CORE_API const FVector DownVector;
/** Unreal forward vector (1,0,0) */
static CORE_API const FVector ForwardVector;
/** Unreal backward vector (-1,0,0) */
static CORE_API const FVector BackwardVector;
/** Unreal right vector (0,1,0) */
static CORE_API const FVector RightVector;
/** Unreal left vector (0,-1,0) */
static CORE_API const FVector LeftVector;
打印FVector:
UE_LOG(LogTemp, Warning, TEXT("MyCharacter's Location is %s"), *MyCharacter->GetActorLocation().ToString());