diff options
author | Julien Gouesse <[email protected]> | 2018-01-27 11:30:06 +0100 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2018-01-27 11:30:06 +0100 |
commit | 32e0d417017c81b2c1ab3aba278a113e67547559 (patch) | |
tree | 47644ec884560731cdf6980f865843b22f84756a /ardor3d-extras/src | |
parent | 965609875a87c494a17298ea56e98f9f55c8cc40 (diff) | |
parent | 67d620baf5eaf5b0ce66800e468719a9ef79ef25 (diff) |
Merges Renanse's commit 67d620baf5eaf5b0ce66800e468719a9ef79ef25
Diffstat (limited to 'ardor3d-extras/src')
-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 9c144e9..7bc8732 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 @@ -132,7 +132,7 @@ public class InteractManager { @Override 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 7ede192..a800fa7 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); |