I want my PositionHandle to be influenced by Global and Local transform settings in the Editor just like built-in Unity one:
How do I do that?
I want my PositionHandle to be influenced by Global and Local transform settings in the Editor just like built-in Unity one:
How do I do that?
Maybe a bit late to the party but for anyone in the future.
As I understand you want your Editor script’s Handle.PositionHandle orientation based on the scene settings.
You could use this snippet:
Quaternion handleRotation = Tools.pivotRotation == PivotRotation.Global
? Quaternion.identity
: targetRotation;
Vector3 nodeTargetPosition = Handles.PositionHandle(handlePosition, handleRotation);