1
$\begingroup$

How can I rotate a mesh about another object using animation node in blender

My thoughts were to have the circle/triangle mesh node pivot point be the same as the cube piviot point I was following along using a video but it uses a matrix instead of a mesh. https://youtu.be/EWkK11PQG_Y?t=3m23s

I also tried using the offset node I thought I could use the Global Axis - Global Pivot node but had some issues with converting the nodes from mesh to matrices https://animation-nodes-manual.readthedocs.io/en/latest/user_guide/nodes/matrix/offset_matrices.html

offset

I 'm using Ubuntu 18.04 64bit, Python 3.6.5, numpy 1.15.0, blender 2.79b, Animation Node addon 2.1.2 Beta.

$\endgroup$
5
$\begingroup$

You can use the Transform Mesh Node where the matrix is a multiplication of three matrices, translation such that the target object becomes at the origin, rotation then translating back.

Node Tree

$\endgroup$
2
$\begingroup$

I see two workarounds:

1. Object origin

If you have no need to keep the origin of the triangle in its geometry center, you can just move it at the same coords of the cube's origin:

  • Select the cube;
  • Press SHIFT+S and click "Cursor to Selected" in the dropdown menu;
  • Select the triangle;
  • press CTRLSHIFTALTC and click "Origin to 3D Cursor" in the dropdown menu;

Now the triangle has the same rotation/scaling pivot of the cube.

2. Parenting with Empty object.

  • Select the cube;
  • Press SHIFT+S and click "Cursor to Selected" in the dropdown menu;
  • SHIFT+A and add an Empty object.
  • Select the triangle and then add the Empty to the selection (selecting it while you hold SHIFT);
  • Press CTRL+P and click on "Object" in the dropdown menu.

Now the triangle is child of Empty, you can rotate Empty to rotate the triangle on the same pivot of the cube.

$\endgroup$
  • 1
    $\begingroup$ There is no need to such workarounds, Animation Nodes likes a procedural workflow. $\endgroup$ – Omar Emara Aug 17 '18 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.