參考:
https://docs.unrealengine.com/en-US/BlueprintAPI/Utilities/Transformation/SetRelativeLocation/index.html
?
SetRelativeLocation :設置組件相對于父組件的位置
參數為
ue4sequence控制樣條線。FVector
我這里主要舉個例子在說明這個函數的意思,比較直觀
調用如下函數:
MSkeletaMeshComponent->SetRelativeLocation(FVector(0,0,-90));
顯示效果:
ue4中如何更改坐標軸,?MSkeletaMeshComponent->SetRelativeLocation(FVector(0,0,-160));
?MSkeletaMeshComponent->SetRelativeLocation(FVector(0,90,-90));
?MSkeletaMeshComponent->SetRelativeLocation(FVector(90,0,-90));
ue4怎么更改物體坐標點,?總結:
改變x的值,人物朝著前后移動
改變y的值,人物朝著左右移動
改變z的值,人物上下移動
這里是坐標,基本上可以對應上。
ue4世界位置偏移??
SetRelativeRotation:這個函數主要設置人物的旋轉
MSkeletaMeshComponent->SetRelativeRotation(FRotator(0, -90, 0));
MSkeletaMeshComponent->SetRelativeRotation(FRotator(0, -45, 0));
ue4反射捕獲需要重建。?MSkeletaMeshComponent->SetRelativeRotation(FRotator(45, -90 ,0));
?MSkeletaMeshComponent->SetRelativeRotation(FRotator(0, -90 ,45));
?看一下定義解釋
struct FRotator
{
public:
?? ?/** Rotation around the right axis (around Y axis), Looking up and down (0=Straight Ahead, +Up, -Down) */
?? ?float Pitch;?
UE4調整物體坐標軸。?? ?/** Rotation around the up axis (around Z axis), Running in circles 0=East, +North, -South. */
?? ?float Yaw;?
?? ?/** Rotation around the forward axis (around X axis), Tilting your head, 0=Straight, +Clockwise, -CCW. */
?? ?float Roll;
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态