syed samoon Posted December 22, 2017 Share Posted December 22, 2017 Hi Everyone, How to visually check the sphere imposter shape and size of player in babylon??? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 22, 2017 Share Posted December 22, 2017 Hi SS! There is currently no known way to do that. Sorry. Avoid scaling mesh AFTER physicsImpostor added. <-- perhaps wise for safety. Bad idea #1: Make a wireframe mesh that is exact size of physics mesh. Do not set physics on copy. Position and rotate copy to SAME as master mesh. Do NOT parent wireframe copy... to master mesh. In renderLoop, constantly GET mesh.physicsImpostor.physicsBody... position and Quaternion-rotation values. You may need to convert Oimo/Cannon quaternion... to BJS quaternion. Apply values to wireframe copy. This does not check "size" (scaling), but it tracks precise position and quaternion-rotation... of the physics body, which is what you wish-for. Bad idea #2. You can somewhat "see" an impostor... IF you go "balls to the walls" hehe. Build a physics-active box with no top (made from 5 planes/thin-boxes). Put the player/impostor into the box. Now fill the box with SMALL physics-active spheres/boxes. You should be able to see the shape/size/orientation of the master impostor. You can also "pour" lots of little physics balls over the master mesh, and they will roll-off and indicate shape. A garden-hose that sprays BB's. Wow, two bad ideas... in one post! Ain't it great!? Others may have better ideas... soon. (let's pray so) GameMonetize 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.