Huh? What did you expect? The pivot acts as the ‘parent’ of the box. When you reset the pivot, the box comes along keeping with the same position relative to the pivot. If you want to move the pivot position on your box, you would need to instruct that (I suppose). Or I didn’t get your question correctly, did I?
If the box has been rotated, changing the pivot point will change the position.
lines 47 to 48.
I know it’s because the pivot point changes and the old rotation value is applied to the new pivot point, but I don’t want this, is there any solution?
Huh, might be missing something but why not simply zero the rotation before setting the new pivot?
If you need to keep with the rotation values, I believe you could store them and reapply them after setting the new parent/pivot, no? Forgive me if I’m disregarding something important here.
Oh yes, silly me. You actually want to keep with both the rotation and position of the cube while displacing the pivot, did I understand that correctly now (finally)? or still not?
Should the pivot point values not be applied to the node matrix,as this would update the node’s transformation result every time the pivot point is modified
Yes, obviously. I think I understand now why it took so long for @JohnK to return to you with a solution (he’s by far more skilled than I’am on this kind of things). This is a bit tricky because it’s not really part of the method. We might need to find some sort of go-around (i’m quite sure we can find one). It’s interesting though (sry that it impacts your project) but yes, interesting… May be some food for thoughts to change the way we use the gizmo and parent it. I’ll try think of something and I’m pretty sure @JohnK will do the same. May be others will kick-in. Just a little bit more patience… (sry)
Do you want me (or you) to callin some other people on this. I think the question makes sense depending on use case and eventually deserves a proper answer/solution? May be the answer is simple and we missed it and then, may be not…What are your thoughts on this?
Thanks,
If you cache and reset the absolute position it will be in the same position as before changing the pivot point, however the rotation must be reset to 0 otherwise the position will be altered…
Yes, I guess it can be part of the solution. However when you re-apply the rotation, it will still rotate from the new pivot position (thus changing the position of the cube when viewed from the camera).