I am trying to replicate a physical dial/potentiometer like that which would be found on a synthesizer. So far I am able to rotate a rigidbody cylinder around freely on its x-axis with the z and y locked using the ‘drag rigid body’ script, but I need to limit its rotation to something like -45 to 45, so it has a ‘min’ and ‘max’ value which it can not exceed instead of spinning endlessly.
I’m using the script you posted Meltdown (with javascript modifications) and the lower boundary works, but as the cylinder rotates back up to 0 it just keeps snapping to -100. So basically I can only rotate my dial left, then it keeps snapping back to the lower boundary value. The script looks like this.