Search code examples
c++unreal-engine4unreal-blueprint

UE4, setting relative angular velocity of object


Context

I have been attempting to set the angular velocity of a frisbee in UE4. This is easy. However, UE4 adds an angular velocity through the center of mass of an object relative to the 'world-axis' and not relative to the axis of the frisbee. Below the 'World' axis is red, and the relative axis is green, and the frisbee is blue. The Left is a sideway cross-section of the frisbee if you were to throw it forward and angled upward, the right is a 3-D representation of the same throw.

Issue

The issue is when the disc's relative axis and the 'world' axis are not the same. Since the disc rotates around the world axis, and not the relative axis, it will wobble whenever angular velocity is applied. Is there any way I can change to apply velocity via the local axis?

Thank you!

enter image description here

enter image description here


Solution

  • You need to transform the axis from local space to world space. Something along these lines:

    blueprint