linearGravityField() is not affecting physics bodies in the scene SceneKit

前端 未结 3 485
半阙折子戏
半阙折子戏 2021-01-14 21:07

I\'m trying to use a SCNPhysicsField.linearGravityField object to affect only specific objects in my scene. The problem is, that I can\'t seem to get it to affect anything.

3条回答
  •  无人及你
    2021-01-14 21:38

    Set the "downGravityCatagory" bit mask on the node:

    dice.categoryBitMask = downGravityCatagory;
    

    the physics's categoryBitMask is for physics collisions only.

提交回复
热议问题