4
$\begingroup$

annotation

I have two cubes (Cube1 and Cube2) and I am positioning an icosphere by adding the two vectors of the former cubes. I then scale the icosphere's vector by 0.5 so that it sits visually between the two cubes.

What I really want is for it to sit between the two cubes on the green vector so that I can move it between the two cubes. I noticed that the icosphere moves on its local axis rather than world axis.

I have read a lot about vectors and matrices etc. and still find it difficult to understand sometimes.

So my questions are, how would I get my icosphere to use the green vector for its position, and if possible explain why it only moves in local space rather than world space, and is it even possible to move it in world space so its pivot point moves with it?

$\endgroup$

2 Answers 2

8
$\begingroup$

[Fun fact: every answer needs at least 30 characters. Markup symbols don't count.]

$\endgroup$
7
  • $\begingroup$ Interesting use of the mix node, didn't expect this $\endgroup$
    – Neil
    Feb 18, 2022 at 14:26
  • 1
    $\begingroup$ @Neil take a look at this answer by Marty Fouts, which effectively is a list of vector formulas you can replace with the Mix RGB node. $\endgroup$ Feb 18, 2022 at 14:40
  • 2
    $\begingroup$ FYI the character limit is there to enforce at least a bit of explanation if you post only a video. Some people with disabilities or with very slow internet connection have trouble with gifs :) $\endgroup$
    – Gorgious
    Feb 18, 2022 at 15:04
  • 2
    $\begingroup$ @Neil every vertex has a coordinate. Those coordinates, as well as connections between vertices (and some other attributes like smooth shading or material slot) define a mesh. An object is a wrapper of a mesh, that allows you to add stuff like rotation, scale, translation (location), parenting, constraints... matrix_world is the result transformation matrix that is applied to each vertex coordinate in order to evaluate the real coordinate. $\endgroup$ Feb 18, 2022 at 17:06
  • 1
    $\begingroup$ @Neil correct, geometry nodes modify geometry. They have access to object properties, but can't modify it. position of the origin is an object property (location), so you can't modify it in geometry nodes. $\endgroup$ Feb 21, 2022 at 17:04
2
$\begingroup$

I'm not entirely certain if this is what you wanted but this does what you described.

https://giant.gfycat.com/ScientificShockingCarpenterant.mp4

Here's the node tree

enter image description here

and if you want it to go 0-1 you can just put a map range

enter image description here

$\endgroup$
3
  • $\begingroup$ I guess this goes in the right direction. Although if I see it correctly, the scaling seems to be a bit weird... I understand the question like with scale 0 the icosphere should be at cube 1 for example, at scale 1 it should be at cube 2. So that the path between the cubes is always from 0 to 1 so that a scale of 0.5 is the exact center between those cubes. Right now it looks a bit different but I'm not sure. Unfortunately I have no time now to test it, but maybe my comment can help you tweaking your setup (if it's not already doing what I describe and I just didn't realize it). $\endgroup$ Feb 18, 2022 at 13:58
  • $\begingroup$ Just throw a map range in front if you want it between 0-1. I'll edit $\endgroup$
    – TheJeran
    Feb 18, 2022 at 14:08
  • $\begingroup$ Thank you, I'll take a look at this later. Would you be able to answer my question on local v world space also? $\endgroup$
    – Neil
    Feb 18, 2022 at 14:12

You must log in to answer this question.

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