chandlerprall / Physijs

Physics plugin for Three.js
MIT License
2.77k stars 455 forks source link

Error: _object.setWorldTransform is not a function #237

Closed ilanusse closed 5 years ago

ilanusse commented 9 years ago

Hello!

Physijs is not updating my mesh's position and rotation even though I am setting the __dirty flags to true.

My code is as follows:

this.mesh.position.y = position;
this.mesh.setRotationFromQuaternion(quaternion);
this.mesh.__dirtyPosition = true;
this.mesh.__dirtyRotation = true;

And yet I get the following error:

_object.setWorldTransform is not a function

The function throwing the error is updateTransform in physijs_worker.js.

I'm using threejs r71.

InitialCrow commented 8 years ago

i add the same problem do you find the response ??

JSideris commented 5 years ago

This is still a problem in 2019. I solved it by removing the object from the scene, moving it, and re-adding it back to the scene. The __dirtyPosition does not need to be set if you do this.