Proximity interaction

Hey Everyone, I noticed the addition of a mouseX and mouseY with the recent updates and wanted to try my hand at a proximity based interaction.

so the idea is basically: I take the mouse X and mouse Y, check it against the X and Y of my component, calculate the distance between the two, and then using a range map, translate that into how far along in an animation the component is.

I’ve gotten that interaction to work using the following setup (the issues will become clear very quickly):

-I have a “Main” viewmodel and a “Node” viewmodel
-”Main” contains:
mouseX
mouseY
A Node viewmodel for every artboard → linked to a seperate instance per model

-”Node” contains:
xPos
yPos
proximity

adjustedXPow & adjustedYPow (these don’t do anything, i forgot to delete them in the current version of the .rev i sent along.

then, a bunch of converters that are pretty basic, but the one that’s making things difficult for me is:
proximityCalc - which is just the formula for calculating distance between xPos and mouseX, and yPos and mouseY

Currently i have that converter as many times as i have instances and viewmodels, because it needs the correct xPos and yPos, but since converters are top level, i can’t seem to find a way of getting a setup where i can have a single converter, and let it handle the calculation,which is the same every time, except the input xPos and yPos are different.

then finally: i have my components in the artboard, linked up and with a custom property “proximity” which writes to the proximity property in the viewmodel, which is then used later in a time remap of an animation with some converters in a group to manipulate the proximity output to actually drive the animation.

The current setup takes super long to set up if you want extra components, and my Rive even crashes if i try to duplicate the artboard beyond 13. I feel like i’m missing a crucial part.

I’ve asked the agent, it started by giving me a script, but that script still required an extra instance of that script for every artboard, and also didn’t give me the “proximity” output that i was looking for.


Here’s how it looks right now:

Schermopname 2026-10-02 om 15.08.04.mov


I want the proximity output to retain control over the animation, but also to use it in the state machine, or elsewhere in the artboard.

Hope this all makes sense, wonder if there’s a feasible way to do it that is both lightweight, and still gives me the control I’m looking for. I’ve attached my .rev file if anyone is kind enought to have a look.

appreciate you all!

proximity_attempt.rev