|
@@ -122,9 +122,10 @@ public class MoveManager {
|
|
//computing the inverse world transform to get the new localtranslation
|
|
//computing the inverse world transform to get the new localtranslation
|
|
newPos.subtractLocal(spatial.getParent().getWorldTranslation());
|
|
newPos.subtractLocal(spatial.getParent().getWorldTranslation());
|
|
newPos = spatial.getParent().getWorldRotation().inverse().normalizeLocal().multLocal(newPos);
|
|
newPos = spatial.getParent().getWorldRotation().inverse().normalizeLocal().multLocal(newPos);
|
|
|
|
+ newPos.divideLocal(spatial.getParent().getWorldScale());
|
|
|
|
|
|
lastLoc = newPos;
|
|
lastLoc = newPos;
|
|
- spatial.setLocalTranslation(newPos);
|
|
|
|
|
|
+ spatial.setLocalTranslation(newPos);
|
|
|
|
|
|
RigidBodyControl control = spatial.getControl(RigidBodyControl.class);
|
|
RigidBodyControl control = spatial.getControl(RigidBodyControl.class);
|
|
if (control != null) {
|
|
if (control != null) {
|