1

当一个物理对象与另一个物理对象发生碰撞时,与实际情况不同,它不一定会反弹。我发现如果一个圆以接近切线的角度撞击另一个圆或撞击一个移动的物体,它会“粘”在它上面并向上/向下/滑过physicsBody的边缘而不是弹开。

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

有谁知道解决方案/原因?

4

1 回答 1

1

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

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 属性

于 2014-02-11T23:57:53.980 回答