ian Posted September 19, 2016 Share Posted September 19, 2016 Is is there any way to debug impostor of mesh. If we have BABYLON.PhysicsImpostor.BoxImpostor on some mesh, Can we debug bouning box of BoxImpostor or any other impostors, that we can see how Impostors looks like around mesh? greetings ian Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 19, 2016 Share Posted September 19, 2016 For boxImpostor you can ask the debugLayer to display the bounding box (which is used to create the impostor) Quote Link to comment Share on other sites More sharing options...
ian Posted September 19, 2016 Author Share Posted September 19, 2016 I don't think so. Look at Differences between (if we debug bounding Boxes ) Bridge have (1. this first example I think that BoxImpostor is shifted because Bridge's origion/pivot is not in center but in center of lower Bridge's face. In this excample I think BoxImpostor is not around Bridge but is shifted because of Bridge's origin) http://www.babylonjs-playground.com/#MBFUI#3 and (2. this bounding Box is ok because Bridge's origin is in center of Bridge ) http://www.babylonjs-playground.com/#MBFUI#5 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 19, 2016 Share Posted September 19, 2016 You're right. If pivot is changed then you don't have a visual way today to debug it Quote Link to comment Share on other sites More sharing options...
adam Posted September 19, 2016 Share Posted September 19, 2016 Here is a PhysicsImposterViewer I wrote up real quick. It only supports Cannon spheres and boxes. http://www.babylonjs-playground.com/#MBFUI#6 ian 1 Quote Link to comment Share on other sites More sharing options...
ian Posted September 19, 2016 Author Share Posted September 19, 2016 qul staff. I'll take al look of your code PhysicsImposterViewer. Thank you. I don't know a lot like you guys. qul staff Quote Link to comment Share on other sites More sharing options...
ian Posted September 19, 2016 Author Share Posted September 19, 2016 2 hours ago, adam said: Here is a PhysicsImposterViewer I wrote up real quick. It only supports Cannon spheres and boxes. http://www.babylonjs-playground.com/#MBFUI#6 qul Quote Link to comment Share on other sites More sharing options...
ian Posted June 30, 2017 Author Share Posted June 30, 2017 @adam Can you explain me what exactly this code do? What means shape.halfExtents and why you do mesh.scaling.x = shape.halfExtents.x * 2; mesh.scaling.y = shape.halfExtents.y * 2; mesh.scaling.z = shape.halfExtents.z * 2; and mesh.scaling.x = shape.boundingSphereRadius * 2; mesh.scaling.y = shape.boundingSphereRadius * 2; mesh.scaling.z = shape.boundingSphereRadius * 2; why number 2 ? greetings Ian Quote Link to comment Share on other sites More sharing options...
adam Posted June 30, 2017 Share Posted June 30, 2017 I multiplied halfExtents and radius by 2 because they are half the size of the body. Here is a better example: http://www.babylonjs-playground.com/#BEFOO#183 My goal is to add this to the debugger at some point so that you don't have to add the extra code. GameMonetize, Wingnut and ian 3 Quote Link to comment Share on other sites More sharing options...
ian Posted June 30, 2017 Author Share Posted June 30, 2017 This your qul example could be included in Inspector for enable/disable (hide/show) physics impostors in scene. Now Inspector does not have any debug options for physics impostors. What do you think @Deltakosh @RaananW @Wingnut ? Who build Inspector(babylonJS debuger) ? So we can ping who build Inspector to include physics impostor debuging What are your opinion about adding physics impostor debuging in Inspector of BabylonJS. Greetings Ian Quote Link to comment Share on other sites More sharing options...
adam Posted June 30, 2017 Share Posted June 30, 2017 5 minutes ago, ian said: This your qul example could be included in Inspector for enable/disable (hide/show) physics impostors in scene. Now Inspector does not have any debug options for physics impostors. When I said debugger, I was referring to inspector. ian 1 Quote Link to comment Share on other sites More sharing options...
adam Posted July 2, 2017 Share Posted July 2, 2017 I just submitted a PR for a physics tab in the inspector. https://github.com/BabylonJS/Babylon.js/pull/2414 ian 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.