SceneKit SCNPhysicsBody get notified of resting

前端 未结 1 940
無奈伤痛
無奈伤痛 2021-01-25 03:27

SceneKit Is there a way to get notified when dynamicBody is in resting State ? I want to remove dynamicBody when it finished to fall to th

相关标签:
1条回答
  • 2021-01-25 04:03

    You could use Key-Value Observation on the isResting property. See Is key-value observation (KVO) available in Swift?.

    Or you could use the SCNPhysicsContact and SCNPhysicsContactDelegate to detect collisions with the floor, and use that to trigger a check for velocity.

    0 讨论(0)
提交回复
热议问题