diff options
Diffstat (limited to 'ardor3d-extras/src/main/java/com')
-rw-r--r-- | ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java | 2 | ||||
-rw-r--r-- | ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java index e55c63a..f855cb3 100644 --- a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java +++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/InteractManager.java @@ -130,7 +130,7 @@ public class InteractManager { }, new TriggerAction() { public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) { if (_spatialTarget != null) { - _state.getTransform().set(_spatialTarget.getTransform()); + _state.copyState(_spatialTarget); } _inputConsumed.set(false); offerInputToWidgets(source, inputStates); diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java index b9aaae4..2364e25 100644 --- a/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java +++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/interact/data/SpatialState.java @@ -38,6 +38,11 @@ public class SpatialState { _userData = userData; } + public void copyState(final Spatial source) { + _transform.set(source.getTransform()); + _userData = source.getUserData(); + } + public void applyState(final Spatial target) { target.setTransform(_transform); target.setUserData(_userData); |