Announcement

Collapse
No announcement yet.

Blueprint rotation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Blueprint rotation

    Hi

    I am very new to UE4 so forgive me if this is a very simple question.

    I would like to know how to rotate a cube along a particular axis over a number of frames. I would also like the pivot of the rotation on a particular edge. Basically I am asking how I turn a cube from one face on to an adjacent face over a period of time. Can this be done in Blueprint or is it something that needs to be done in C++? Any pointers would be great! :-)

    In code I would generally do something like:

    // the variables in the RotateAround method would be actual values

    private void onUpdate(float delta)
    {
    myCube.RotateAround(pivotVector3, rotationVector3, angleFloat * delta);
    }

    Hope this makes sense. Thanks in advance.

    #2
    I've had a little play around and I think I need to do this:

    Add the cube to a root component, before the move - move the root component to the pivot location and move the cube back half it's width on the same axis, then rotate the root on a local axis. Would this be a good way to approach the problem?

    Regards

    Comment

    Working...
    X