Hitboxes not updating after changing layoutScaleFactor

I’m working with Rive inside a Next.js app, and I’m using the layoutScaleFactor to adapt the scale of the layout based on the window height. The scale factor is computed dynamically and applied like this:

rive.layout = new Layout({
  fit: layout,
  layoutScaleFactor: newScaleFactor,
});

This works great visually — the artboard scales correctly on resize. However, the interactive hitboxes (e.g., for state machines listener’s targets for pointer enter events) do not seem to scale along with it. They remain in their original positions and sizes, making interaction zones inaccurate after resizing.


Screen Recording 2025-03-27 at 6.11.42 PM.mov