【问题标题】:How can I transform rotation to FVector in Unreal Engine 5?如何在虚幻引擎 5 中将旋转转换为 FVector?
【发布时间】:2021-12-03 18:54:24
【问题描述】:

如何将MainComponent->GetComponentRotation() 转换为FVector

我必须为子组件使用AddForce() 吗?

我需要得到它的旋转向量。如何正确获取?

【问题讨论】:

  • 应该可以使用MainComponent->GetComponentRotation().Vector() 或者只是MainComponent->GetComponentForwardVector()
  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: c++ unreal-engine5


【解决方案1】:

你应该可以使用任何一个

MainComponent->GetComponentRotation().Vector();

MainComponent->GetComponentForwardVector();

有关详细信息,请参阅文档 - GetComponentRotation()GetComponentForwardVector()

【讨论】:

    猜你喜欢
    • 2022-10-22
    • 1970-01-01
    • 1970-01-01
    • 2016-05-20
    • 1970-01-01
    • 1970-01-01
    • 2017-02-09
    • 2022-06-13
    • 2023-02-19
    相关资源
    最近更新 更多