When applying a force on a dynamic body, it seems that this force won't be persistent even if impulse is set at false
.
I have a sphereNode with a physicsBody : dynamic, mass=1 and damping=0. World gravity is set at (0,0,0).
If I apply a force in a gesture recognizer :
func Detected(sender: UILongPressGestureRecognizer) {
if sender.state == UIGestureRecognizerState.Began {
sphereNode.physicsBody!.applyForce(SCNVector3Make(1, 0, 0), impulse: false)
}
if sender.state == UIGestureRecognizerState.Ended {
sphereNode.physicsBody!.clearAllForces()
}
}
Then the velocity goes to 0.0166
as if the force was applied only during one frame and stay constant unless I trigger the gesture again.
The only way to make it work as a true constant force is to call applyforce in the renderer loop but then the only difference with the non-impulse applyforce is a factor of 60. I don't think that is the expected behavior.