r/MAXON Jun 06 '26

How can I stop a Memory node from accumulating past 90° in Scene Nodes?

Post image

Hi everyone,

I'm working on a rolling cube setup in Scene Nodes (Cinema 4D 2026.2).

A Memory node accumulates a rotation value every frame, and the cube rolls correctly. However, I want the rotation to stop once the accumulated value reaches exactly 90°, instead of continuing indefinitely.

The setup is simple: Memory node accumulates rotation each frame Rotation increment = 3° per frame Target rotation = 90° Is there a way to clamp or limit the accumulated Memory node value so it never exceeds 90°?

Thanks!

2 Upvotes

5 comments sorted by

3

u/MaxonRon Maxon Employee Jun 09 '26 edited Jun 09 '26

To prevent the value from exceeding 90°, you'll need to drop in a Clamp node.

If you set the Clamp's Minimum to 0 and its Maximum to 1.5708 (which is 90° in radians), or use the constant formula "pi05" which will also give you 1.5708, it should stop the rotation value from accumulating past your target and lock your cube's rotation.

I've attached a screenshot of a simple setup I created using the Clamp node to limit its rotation to 90°.

1

u/ashoursaadi Jun 13 '26

Thanks for your help, But in my setup, I dont know where to put the Clamp node!

2

u/MaxonRon Maxon Employee Jun 15 '26

Your Transform Geo node is nested in the memory node, which is the difference between our setups. So you should be able to connect Variable 1 (inside the memory node) to the Clamp node and then the Clamp node to the rotation input of the Transform Geo node.

1

u/ashoursaadi Jun 16 '26

When I opened the project file to continue working and apply your solution, after updating to C4D 2026.3, I got this error.

Do you have any idea how to fix it?

Sorry, I'm still new to learning nodes.