Search code examples
iossprite-kitcocos2d-iphone

SpriteKit linearDamping - maximum?


Note that Apple's doco asserts

https://developer.apple.com/documentation/spritekit/skphysicsbody/1519796-lineardamping

This property is used to simulate fluid or air friction forces on the body. The property must be a value between 0.0 and 1.0. The default value is 0.1. If the value is 0.0, no linear damping is applied to the object.

In fact: you can set values higher than one - so, "10.0" and "20.0" work perfectly; 1, 10 and 20 are all very clearly different.

  • has anyone probed in to this and discovered if there is actually a maximum? (If it just asymptotes away, what's the realistic range?)

Solution

  • The Apple doco is simply wrong.

    Just to answer my own question, in iOS:

    The actual documentation:

    This property is used to simulate fluid or air friction forces on the body. The property must be a value between 0.0 and 1.0. The default value is 0.1. If the value is 0.0, no linear damping is applied to the object.

    is simply wrong.

    A value of about 10 to 15 is typical when you want typical "strong damping" like in many physics scenes.

    I very often use values of 2 or 3. And "10" is our value for "very thick honey".