ue4sequence控制樣條線,UE4之SetRelativeLocation 和SetRelativeRotation

 2023-11-30 阅读 29 评论 0

摘要:參考: https://docs.unrealengine.com/en-US/BlueprintAPI/Utilities/Transformation/SetRelativeLocation/index.html ? SetRelativeLocation :設置組件相對于父組件的位置 參數為 ue4sequence控制樣條線。FVector 我這里主要舉個例子在說明這個函數的意思

參考:

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;

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/1/185770.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息