MZ How to trigger an even within the specific space in a picture?

The title is a total mess, anyway, I was curious to know if it was possible to trigger an event with only a part of a picture (like in the image.)
For example; what I'd like to do is to rotate and move the controller (red) which has a button (green)

1000032461.png

I can't simply use two individual pictures because I have to move and rotate the "controller" and the button would be unable to rotate with said controller.
Oh also, if the trigger is at the center or upper left, does it need a different script if it's not centered?
I assume you're using ButtonPicture or a similar plugin? If so, what I posted here (opacity threshold for clickable sprites) might help:
You could try saving this as a .js file and loading it as a plugin:
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc Opacity threshold for clickable picture hit test.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/posts/1553909/
 * @help Free to use and/or modify for any project, no credit required.
 */
;void (() => {
"use strict";
  /** To be clickable, a pixel must have at least this much opacity (0~255). */
  const THRESHOLD = 1;

  /**
   * Determines scope:
   * - `true`: apply opacity check only for pictures.
   * - `false`: apply opacity check for all clickable sprites (e.g. enemies in battle).
   */
  const PICTURES_ONLY = true;

  /** Base class to modify. */
  const C = PICTURES_ONLY ? Sprite_Picture : Sprite_Clickable;

  // Patch - add opacity threshold to picture sprite hit test.
  const alias = C.prototype.hitTest;
  C.prototype.hitTest = function(x, y) {
    if (alias.apply(this, arguments)) {
      const b = this.bitmap;
      if (b) {
        const ax = this.anchor.x * this.width;
        const ay = this.anchor.y * this.height;
        const op = this.opacity / 255;
        return b.getAlphaPixel(x + ax, y + ay) * op >= THRESHOLD;
      }
      return true;
    }
    return false;
  };

})();
I haven't tested this, but it's a refactor of what I've used in my own plugin (Cae_PictureTouch), so it should work unless I've made a typo or something. 👋

Alternatively maybe someone knows of a plugin that can offset a specified picture's pivot or anchor.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-trigger-an-even-within-the-specific-space-in-a-picture.183507/