diff --git a/spine-ts/spine-core/src/PhysicsConstraintData.ts b/spine-ts/spine-core/src/PhysicsConstraintData.ts index ee590718e..ec3a80b7f 100644 --- a/spine-ts/spine-core/src/PhysicsConstraintData.ts +++ b/spine-ts/spine-core/src/PhysicsConstraintData.ts @@ -46,8 +46,8 @@ export class PhysicsConstraintData extends ConstraintData { x = 0; y = 0; rotate = 0; - scaleX = 1; - shearX = 1; + scaleX = 0; + shearX = 0; step = 0; inertia = 0; strength = 0; diff --git a/spine-ts/spine-webgl/example/physics.html b/spine-ts/spine-webgl/example/physics.html index 4da50395c..d0f9db0e5 100644 --- a/spine-ts/spine-webgl/example/physics.html +++ b/spine-ts/spine-webgl/example/physics.html @@ -36,7 +36,7 @@ var skeletonBinary = new spine.SkeletonBinary(atlasLoader); // Set the scale to apply during parsing, parse the file, and create a new skeleton. - skeletonBinary.scale = 1; + skeletonBinary.scale = 0.2; var skeletonData = skeletonBinary.readSkeletonData(assetManager.require("assets/sack-pro.skel")); this.skeleton = new spine.Skeleton(skeletonData); @@ -51,9 +51,9 @@ this.animationState.update(delta); // Apply the animation state to the skeleton. this.animationState.apply(this.skeleton); - // Let the skeleton update the transforms of its bones. - this.skeleton.updateWorldTransform(spine.Physics.update); + // Let the skeleton update the transforms of its bones and apply physics this.skeleton.update(delta); + this.skeleton.updateWorldTransform(spine.Physics.update); } render(canvas) {