I forked your sources and enhance a few things.
- It’s based on routine like yours.
- I implemented the autorefresh for the current position.
- I also added the contact action (I have a base with a magnet to trigger an action if the cube is on the base or not).
- I simplify the orientation logic (more readable)
2 Likes