Godot Version
4.6
Question
I’m working on a system where you connect pieces together with each other by dragging and dropping onto their surfaces.
Recently I’ve added functionality for some of these pieces to spin, making everything connected to them spin with them (just like adding a mesh into a Node3d and rotating the Node3d).
With this functionality I’d also like to be able to detect if any piece in this tree has spun around it’s own y-axis (aka it’s globaltransform.basis.y). Because of how the system works the only values I got to work with is the globaltransform of each pieces.
So what I’m wondering if there is a way to meassure the difference in rotation around it’s own y-axis with a system like this using only it’s globaltransform?
The picture below displays two potential scenarios where the red cylinder is spinning and thus making the attached green cylinder spin.
In the demonstration on the left when it’s attached on the outside the rotation shouldn’t account for spinning around it’s y-axis.
In the demonstration on the right when it’s attached to the inside the rotation should account for spinning around it’s y-axis.
Would appreciate the help as I’m quite stuck in getting it to work!
