1
$\begingroup$

Why method on picture nor working as intended? It provides some random direction (I want Z direction of object). I just want to copy rotation from object to generated mesh/curve line

enter image description here

$\endgroup$

1 Answer 1

4
$\begingroup$

Although they are both ordered collections of 3 numbers, Directions and Rotations are different things.

  • A Direction is a vector in a 3D space, composed of lengths in the X direction,Y direction, and Z direction of that space.
  • An Euler Rotation is a transformation: a series of angles through which some collection of vectors is rotated about the X,Y, and Z axes of the given space.
  • In a GN tree, the overall 'space' is that of the modified object; measured along the object's own X,Y and Z axes.

You have plugged a Rotation into a Direction.

The simplest way to line your laser beam up with the your handle would be to make the GN-created beam a modification of the handle, with the handle as the input Geometry. Then, from your illustration, the curve's direction would always be (0,0,-1).

However, if you want the beam to be a modification of another (perhaps dummy) object, then you have to compensate for the difference in orientations between the modified object and the handle.

You want the Direction of the beam to be whatever (0,0,-1) becomes when it has been rotated though the same angles as the handle, so this is one way to get hold of that:

enter image description here

$\endgroup$
4
  • $\begingroup$ I've glossed over what X,Y and Z are in Euler rotations.. how the rotation about one axis changes the meaning of the rotation about the next, and why the order of rotations matters. This is a nice explanation. $\endgroup$
    – Robin Betts
    Jan 25, 2022 at 10:24
  • $\begingroup$ Thank you for your attention! So there is 3 types of vector data: Coordinate, Euler Rotations and Directions? $\endgroup$
    – Bicukow
    Jan 25, 2022 at 11:46
  • 1
    $\begingroup$ @AlexanderBicukow Strictly, I suppose... 'Coordinates' are just a way of referring to a set of numbers defining a measurement in some space.. (that could be 2D, 3D, Polar, Spherical) ... A 'Vector' is a line with a length and a direction. The difference between one end and the other of a vector is given by a set of coordinates. 'Direction' is the direction of a vector, ignoring its length. Specifically, the vector's length is ignored by setting it to 1: 'Normalizing' it. A 'Point' is where one end of a vector is, when the other end is at (0,0,0). $\endgroup$
    – Robin Betts
    Jan 25, 2022 at 12:53
  • 1
    $\begingroup$ @AlexanderBicukow An 'Euler Rotation' is not a vector. But it is an ordered set of 3 numbers, so it can be handled by nodes which expect vectors. $\endgroup$
    – Robin Betts
    Jan 25, 2022 at 12:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .