Jump to content

[SOLVED] - physicsImpostor.unregisterOnPhysicsCollide


Recommended Posts

Well it must does not work with an empty array of imposter:

 private _collidedAgainstList:Array<PhysicsImpostor> = [];

this._mesh.physicsImpostor.registerOnPhysicsCollide(this._collidedAgainstList, this.processPhysicsCollisions)

Everything works fine the collisions happen... but i guess it can't find using array.indexOf if the array is empty... Dunno... But does not work

this._mesh.physicsImpostor.unregisterOnPhysicsCollide(this._collidedAgainstList, this.processPhysicsCollisions)

throws the not found error :(

Dunno... I have been thinking above removing OIMO physics support from Toolkit ... If i can't reliable provide an API layer for the toolkit collision detection ... I guess i will only support the engine i can... So far just Cannon... But hopefully this Energy.js engine will AT least provide the type of set mass, friction, restitution, angularDamping, linearDamping, collisionDetection plus onCollide Events that Cannon.js does.

What do you think @Sebavan ???


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...