Play around with angular constraint settings between two meshes.
Features
Optimized for my tablet screen and touch controls. Please leave feedback (or fix!) here with any problems in controls or GUI size/visibility on your machine.
Simple overlapping meshes (boxes) with center and constraint pivot at 0,0,0 and physics axes aligned to X,Y,Z. No gravity and only the child box will rotate around per the constraint.
Display of both mesh’s physics axes. Parent axes are slightly transparent.
Radio buttons to select each axis’ mode: FREE, LOCKED, and LIMITED.
Slider controls for AxisMinLimit aka “min” and width of limits aka “arc” = AxisMinLimit + arc.
Min range is 0 to 360 degrees.
Arc range is 0 to 360 degrees and normalizes AxisMaxLimit within the range -180 degrees to 180 degrees.
I can’t figure out my Red/Yellow box coloring scheme. They appear gray for now. I’ve tried SimpleMaterial, StamdardMaterial, material.color, and material.diffuseColor, to no avail.
Notice that
some combinations of angular constraint limits result in a lot of jitter.
setting “arc” to 0 results in locking the child body to the angles set by “min”.
If you find anything interesting, post your results here!
That’s why I was suggesting to use the emissive. Emissive emits a color against the light (or against no light). It just is (an emitted color). Might not be very sexy but will do for the purpose (I believe).
If any additional effort, I would rather add something that lets us enter ‘start’ and ‘end’ values and then ‘run it’ (as a sequence). I believe that would be a real ‘nice to have’ to serve as a sandbox/testing tool. My opinion only
I’m not sure how sequencing angular constraint limits is useful. If I could implement it, how flexible would you want to specify a sequence?
Two values for any multiple limit min and arcs, and linearly adjust over some time period, all adjustments ramped simultaneously?
Each ramped in sequence one after another? I find it hard to concieve of something flexible that’s not akin to programming…
The other thread mentions moving the hot spot from center. Easily doable but would be a (small) performance hit. I can make it an option, maybe? Currently, the hotspot can be picked without regard to other objects. That is, the hotspots are isolated when picking, other objects don’t get in the way.
When IGizmo is implemented, substituting your own mesh will be doable.
I probably didn’t express myself correctly. I also didn’t take note of the ‘disable physics’ button, already implemented, which stops the ‘animation’. Likely, add a ‘reset’ button that would ‘disable physics and reset the mesh to its initial rotation’ would be enough (instead of having to reload the PG).
Again, that’s really just a ‘nice to have’. It’s only because I didn’t know what else to comment I don’t see this as crucial nor even important.
Well, if you really want more shit comments, do you? Let’s just say that, in general, the label is displayed on top or to the side of the value. Changing the label with the value is not really something common. I would always display the label of ‘min’ and ‘arc’ and the value underneith.
The size of the GUI text is also very small. The labels ‘FREE’, ‘LOCK’ and ‘LIMIT’ are also eventually overlapping because the grid/sliders are so narrow to each other. Again, just a ‘shit comment’, a ‘nice to have’ at the best