- Home /
Hnaldes.DoPositionHandle only one arrow
I am making some editor scripts, and working with manipulator handles for an object.
What's the best way to ONLY render arrows for specific axis when using "Handles.DoPositionHandle?"
I have constrained an objects movement to an axis (by keeping the other axis variables constant), but want to reflect this in my manipulator handles. Is there a way to render this, AND have a handle? I did look at "ArrowHandleCap" but this didn't capture the position the user move aid handle.
Answer by Bunny83 · Sep 24, 2018 at 02:31 PM
PositionHandle is a handle for the whole position. You looked at the wrong method. What you want is a simple Slider. The PositionHandle actually is a combination of several seperate handles into one. Here is the code that uses 3 sliders (in a loop) for the 3 axis.
Thanks!
This method doesn't follow a good na$$anonymous$$g convention... It doesn't have a name similar to "DoSliderHandle" or the like....
Slider was very misleading (made it seem like a slider in a gui menu).
I don't quite get the confusion here. First of all the methods starting with "Do" are actually internal methods which are usually used by the actual method as they are defined in the Handles API. So the actual method is the "PositionHandle".
Also "Slider" is the best fitting description for what it does. The Handles class is all about 3D GUI elements within the scene view. And a single draggable arrow / object along a single axis is a slider as it slides along that axis. What would be your description of such a handle?