0
$\begingroup$

I'm trying to apply a transform to the geometry of an object when it collides with one another. Collision detection is made using Raycast. As you can see on the screenshot, there is a connection error between Greater Than and the Switch node. I don't understand why and how this can be worked around (Blender 4.0.2).

Note: the technique is based on this graph: find out if vertices are inside or outside of another mesh, using geometry nodes

Node graph showing connection error

$\endgroup$
1
  • $\begingroup$ @StefLAncien Thanks, the logic might be flawed but what I am concerned with right now is why I have this connection error between Greater Than and Switch. When this is fixed I can rework the logic if needed. Using a Capture Attribute node doesn't help it. $\endgroup$
    – Alio
    Feb 11 at 20:04

1 Answer 1

1
$\begingroup$

(Using Blender 3.6.5)

The Accumulate Field node is providing one value per vertex of the source geometry, whereas a single value per geometry is expected by the Switch node. This value can be computed by an Attribute Statistic node.

GN graph with attribute statistic node

Resources:

$\endgroup$
1
  • $\begingroup$ Thanks a lot! That fixes the problem indeed. This Attribute Statistic is the first node I see turning field into a value, somehow it seems to me more of these could be needed so we can evaluate and select specific values from fields. The Evaluate functions of fields return fields and not values. $\endgroup$
    – Alio
    Feb 12 at 11:05

You must log in to answer this question.

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