Skip to content

initial transform of a Joint is never cloned #1469

@stephengold

Description

@stephengold

Discovered by visual inspection while tracking down an unrelated issue. Here's a simple test that illustrates the issue:

        Joint testJoint = new Joint("testJoint");
        Assert.assertTrue(testJoint.getInitialTransform().isIdentity());
        
        Joint clone = Cloner.deepClone(testJoint);
        clone.getInitialTransform().setScale(2f);
        
        Assert.assertTrue(testJoint.getInitialTransform().isIdentity());

The 2nd assertTrue() fails because testJoint and its clone share the same initial transform.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions