So with this the whole cube begins changing its color at once.
What I am trying to do is simulate, as mentioned, as if it was a drop of water falling on a pond; circular waves from an origin point. That is, where the cube was hit by the player
I wasn’t able to associate anything with the content I found with materials. I would really appreciate if someone could enlighten me.
English is not my first language so I am sorry for my mistakes. I hope I could make myself clear.
Thanks!
Thank you for answering but I believe my explanation with the loop caused misunderstandings. I am sorry.
What I meant is that effect on the material of a single cube.
As if there was a drop of water falling on top of it and the “waves” (color) propagate through it.
place a Delay node between the Change Color event and the Timeline
give Change Color event a float input so you can call it with custom delay (float input from the event goes into delay node)
when calling Change Color in the loop, check how far from the origin the current overlapping cube is and feed the call delay value based on that distance
Completed untested but that’s the first thing that comes to mind. Should work.
Do tell if it does not or misbehaves.
Say the cube is solid pink and I hit it in a specific point. This point should be the origin of the effect (in your example it is centered on the cube).
how can I trigger this effect so that it starts on that point and completely transitions to solid blue?
I really thank you for taking the time to help me. It is much appreciated!
The material has 2 params, Centre - where to start expanding the circle from and Radius - self explanatory. I create a hole in the middle (subtract) so the blue Radial Gradient can fit right in without blowing the colours out.
The object (the one with the cube) that receives the DropDrop call (via a custom event) runs a Timeline adjusting Radius from 0 to 2 and informs the dynamic material where the hit location is.
The hit location has to be InverseTransformed in order to get local hit coordinates of the object - these are relative to the object centre rather than any of its surfaces so I push the coords up Z by half the Component Bounds - this returns object coordinates on its top surface.
This then has to be MapRanged into values that the material can use: