Jump to content

Mini bug in oimo plugin ?

Samuel Girardin

Recommended Posts

Hi Temechon, 


I think you  developed the oimo plugin, maybe there is a mini bug here, not sure perhaps I m doing something wrong..


So it s here : 

       public unregisterMesh(mesh: AbstractMesh): void {            for (var index = 0; index < this._registeredMeshes.length; index++) {                var registeredMesh = this._registeredMeshes[index];                if (registeredMesh.mesh === mesh || registeredMesh.mesh === mesh.parent) {                    if (registeredMesh.body) {                        this._world.removeRigidBody(registeredMesh.body.body);                        this._unbindBody(registeredMesh.body);                    }                    this._registeredMeshes.splice(index, 1);                    return;                }            }        }

I have to unregister several meshes (just boxes)  and when I do it I have an error  here :

   if (registeredMesh.mesh === mesh || registeredMesh.mesh === mesh.parent) {

with registeredMesh.mesh === mesh.parent    ->  Uncaught TypeError: Cannot read property 'parent' of null 


With only registeredMesh.mesh === mesh unregister is ok.


I m doing something wrong or that s a bug ?



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...