s4m_ur4i Posted May 12, 2018 Share Posted May 12, 2018 I am re-writing this one... thought it was solved but it is not. There is an typescript mismatch between the Phaser3 ts definitions and a body of Phaser.Physics.Arcade.Body. >body< is only defined as an object. So I get typescript errors for using: onFloor(); onCeiling(); setVelocity; etc. etc. for every method which should be available. This can be found in the docs: 1. I enable physics for the sprite 2. run this in a JS file to disable ts. (tested, working, with all methods) 3. run it in ts, I get an error: That <any body method> is not available in type "object". It's not that certain line, but somewere the track of the physics body definition is broken on typescript. (updated docs, ts, phaser to newest version) /** * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. */ body: object; I don't know how to address this "bug", since it should be fixed in the live code which is automatically generated by the phaser docs repo. And I am not experienced enough in the build process of the docs. maybe someone can look after this and tell me how to. regards Link to comment Share on other sites More sharing options...
lupo Posted June 7, 2020 Share Posted June 7, 2020 (edited) Where there any updates to this request? Where you able to solve the problem? I seem to be running in the same issue but its 2020..?! EDIT: Found Solution here:https://github.com/photonstorm/phaser3-docs/issues/24#issuecomment-575623373 Edited June 7, 2020 by lupo Link to comment Share on other sites More sharing options...
Recommended Posts