12-09-2024 07:10 AM - edited 12-13-2024 03:35 AM
I've got a lever that I'm manipulating with a "grabbable" a "hand grab interactable" and a "One grab rotate transformer" the last one with constraints. This is working fine. But when released the lever stays in the transformed position. I would like the lever to return to its original position when released.
If I add a method to return the "target transform" to its original rotation and call it from the unity event wrapper on "when unselect" it seems to work until one tries to manipulate the lever again it then appears that the constraints have rotated by half the difference between min and max. The lever will rotate correctly between these "new" min and max values but of course is visually in the wrong place. i.e if the min max values were originally from -20 to 20. After the "reset" they appear to be from -40 to 0.
Any suggestions on how to properly return the lever to its original position?