securet Posted December 14, 2016 Share Posted December 14, 2016 how to resize a sphere, that has physics applied? this is how I'm doing it now: sphere.scaling.x-=0.01; sphere.scaling.y-=0.01; sphere.scaling.z-=0.01; var velo= sphere.physicsImpostor.getLinearVelocity() ; sphere.physicsImpostor.forceUpdate(); var velo= sphere.setLinearVelocity(velo); but I don't think that this is good practice, so I'm loooking for a method like: sphere.physicsImpostor.scale(-0.01); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 14, 2016 Share Posted December 14, 2016 Ping @RaananW Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 15, 2016 Share Posted December 15, 2016 You will have to recreate the physics body You could dispose the current impostor and recreate one, or you could call impostor.forceUpdate() which will do it for you. If you know what engine you are using, and the engine supports it, you could use the physics body, but this is against the single rule of physics engine, which is rigidity. So expect interesting results 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.