SDK SceneComposer : fix scale tool, now the global option should work
This commit is contained in:
parent
2104edabe4
commit
5c539f5656
@ -122,7 +122,9 @@ public class ScaleTool extends SceneEditTool {
|
||||
lastScale = scale;
|
||||
toolController.getSelectedSpatial().setLocalScale(scale);
|
||||
} else if (pickedMarker.equals(ARROW_X) || pickedMarker.equals(ARROW_Y) || pickedMarker.equals(ARROW_Z)) {
|
||||
Vector3f diff = pickManager.getLocalTranslation(constraintAxis);
|
||||
// Get the translation in the spatial Space
|
||||
Quaternion worldToSpatial = toolController.getSelectedSpatial().getWorldRotation().inverse();
|
||||
Vector3f diff = pickManager.getTranslation(worldToSpatial.mult(constraintAxis));
|
||||
diff.multLocal(0.5f);
|
||||
Vector3f scale = startScale.add(diff);
|
||||
lastScale = scale;
|
||||
|
Loading…
x
Reference in New Issue
Block a user