Xcode Spritekit中的粘性物理体

Xcode Spritekit中的粘性物理体,xcode,sprite-kit,skphysicsbody,Xcode,Sprite Kit,Skphysicsbody,当一个物理物体与另一个物体碰撞时,它不一定会反弹。我发现,如果一个圆以接近切线的角度撞到另一个圆,或者撞到一个移动的物体,它会“粘住”它,并在物理体的边缘上/下/滑动,而不是反弹 增加物理体的恢复只会导致非“接近切线”碰撞的更硬反弹 有人知道解决方法吗?您可以在此处查看不同的属性: Each individual body also has its own property values that determine exactly how it reacts to forces and col

当一个物理物体与另一个物体碰撞时,它不一定会反弹。我发现,如果一个圆以接近切线的角度撞到另一个圆,或者撞到一个移动的物体,它会“粘住”它,并在物理体的边缘上/下/滑动,而不是反弹

增加物理体的恢复只会导致非“接近切线”碰撞的更硬反弹


有人知道解决方法吗?

您可以在此处查看不同的属性:

Each individual body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. Here are the most important properties:

•The mass property determines how forces affect the body, as well as how much momentum the body has when it is involved in a collision.
•The friction property determines the roughness of the body’s surface. It is used to calculate the frictional force that a body applies to other bodies moving along its surface.
•The linearDamping and angularDamping properties are used to calculate friction on the body as it moves through the world. For example, this might be used to simulate air or water friction.
•The restitution property determines how much energy a body maintains during a collision—its bounciness.

Other properties are used to determine how the simulation is performed on the body itself:
•The dynamic property determines whether the body is simulated by the physics subsystem.
•The affectedByGravity property determines whether the simulation exerts a gravitational force on the body. For more information on the physics world, see “Configuring the Physics World.”
•The allowsRotation property determines whether forces can impart angular velocity on the body.
以下是链接:

如果这些都不起作用,您可以尝试在物理体上使用usesPreciseCollisionDetection属性