1
$\begingroup$

I have made a cannon controlled by the geometry nodes. It has a input value nammed 'moving' that allows:

When equals to 0-> it stays still to the inicial position. Rotation Z = 0.

When equals to 1-> it moves with rotation Z = cosine(#frame/10).

It works fine, the only problems is that when you change the value of 'moving' the movement of the canon is not smooth at all.

Is there a way, when you switch the value of 'moving', to move the rotation angle in several frames to the desired position to make the movement more smooth?

Detail Geometry Nodes

Cannon

Video of the cannon movement: Cannon movement

Thanks for you help and time ! :)

$\endgroup$
0

1 Answer 1

0
$\begingroup$

Instead of using a switch node, you could use a mix node like this:

enter image description here

Change the input value of your node group to float and animate the value smoothly:

enter image description here

result:

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ It's a very clean solution and it works fine. The Geometry Nodes code is even easier. Thanks again Chris ! :D $\endgroup$ Commented Mar 10, 2023 at 22:52

You must log in to answer this question.

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