[英]Setting Friction Dynamically in AndEngine Box2d
有什么方法可以在(AndEngine Box2D)中动态设置物理物体的摩擦力
Try this, I think it should work 试试这个,我认为应该可以
body.getFixtureList().get(0).setFriction(x);
In the original Box2D, the friction is cached and you need to call world.Refilter(Shape). 在原始的Box2D中,摩擦被缓存,您需要调用world.Refilter(Shape)。 There is no such method in the physics extension of AndEngine so I hope it will work.
AndEngine的物理扩展中没有这种方法,因此我希望它会起作用。 It may not, though.
不过可能不会。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.