SDK : Scene composer MoveManager now accounts for parent node scale when moving a spatial in the scene composer. This is to avoid the spatial to "jump" when starting moving.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10732 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
e8d38b75f9
commit
20123c74ea
@ -122,9 +122,10 @@ public class MoveManager {
|
||||
//computing the inverse world transform to get the new localtranslation
|
||||
newPos.subtractLocal(spatial.getParent().getWorldTranslation());
|
||||
newPos = spatial.getParent().getWorldRotation().inverse().normalizeLocal().multLocal(newPos);
|
||||
newPos.divideLocal(spatial.getParent().getWorldScale());
|
||||
|
||||
lastLoc = newPos;
|
||||
spatial.setLocalTranslation(newPos);
|
||||
spatial.setLocalTranslation(newPos);
|
||||
|
||||
RigidBodyControl control = spatial.getControl(RigidBodyControl.class);
|
||||
if (control != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user