|
|
@ -169,14 +169,29 @@ public class MoveTool extends SceneEditTool { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void sceneUndo() { |
|
|
|
public void sceneUndo() { |
|
|
|
spatial.setLocalTranslation(before); |
|
|
|
spatial.setLocalTranslation(before); |
|
|
|
|
|
|
|
RigidBodyControl control = toolController.getSelectedSpatial().getControl(RigidBodyControl.class); |
|
|
|
|
|
|
|
if (control != null) { |
|
|
|
|
|
|
|
control.setPhysicsLocation(toolController.getSelectedSpatial().getWorldTranslation()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
CharacterControl character = toolController.getSelectedSpatial().getControl(CharacterControl.class); |
|
|
|
|
|
|
|
if (character != null) { |
|
|
|
|
|
|
|
character.setPhysicsLocation(toolController.getSelectedSpatial().getWorldTranslation()); |
|
|
|
|
|
|
|
} |
|
|
|
toolController.selectedSpatialTransformed(); |
|
|
|
toolController.selectedSpatialTransformed(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void sceneRedo() { |
|
|
|
public void sceneRedo() { |
|
|
|
spatial.setLocalTranslation(after); |
|
|
|
spatial.setLocalTranslation(after); |
|
|
|
|
|
|
|
RigidBodyControl control = toolController.getSelectedSpatial().getControl(RigidBodyControl.class); |
|
|
|
|
|
|
|
if (control != null) { |
|
|
|
|
|
|
|
control.setPhysicsLocation(toolController.getSelectedSpatial().getWorldTranslation()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
CharacterControl character = toolController.getSelectedSpatial().getControl(CharacterControl.class); |
|
|
|
|
|
|
|
if (character != null) { |
|
|
|
|
|
|
|
character.setPhysicsLocation(toolController.getSelectedSpatial().getWorldTranslation()); |
|
|
|
|
|
|
|
} |
|
|
|
toolController.selectedSpatialTransformed(); |
|
|
|
toolController.selectedSpatialTransformed(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|