saltemishel Posted August 25, 2016 Share Posted August 25, 2016 Hi All, I would like to know how can I change my imposter's mass, as it seems that only the value is changed but not the actual mass itself. And how do I remove imposter on run time? scene.removePhysicsBody(this.body); doesn't seems to work. Thanks~ Quote Link to comment Share on other sites More sharing options...
RaananW Posted August 25, 2016 Share Posted August 25, 2016 Hi @saltemishel, the physicsImposter class has two methods that will be very helpful. the first is physcisImpostor.setMass(newMass), which sets the impostor's mass, and the second is physicsImpostor.dispose() which will dispose the impostor. Here is setMass in action - http://www.babylonjs-playground.com/#1HQ6AN (click to set the mass) here is dispose in Action: http://www.babylonjs-playground.com/#1HQ6AN#1 (click to dispose the impostor) saltemishel 1 Quote Link to comment Share on other sites More sharing options...
saltemishel Posted August 26, 2016 Author Share Posted August 26, 2016 Ow wow, thanks for the big help and the examples! 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.