Physics world slows. Not perfect restitution

For some reason my SpriteKit physics world has now stopped giving perfect bounce.

Was not having this issue prevously


Building simple sprite set up from bare bones programatically I am not getting prefect restutution


if I build sprites using the SKS then no problem but building up from plain code I need to set the restitution to about 1.3 to get close


So where can I be loosing enerygy? Have tweaked with literally every value

Replies

Should move this question to a more appropriate part of the forum:

https://forums.developer.apple.com/community/graphics-and-games/spritekit


But I'm surprised that you set a value of 1.3, above 1.0


Doc says:


restitution

The bounciness of the physics body.

Framework

SpriteKit

Declaration

var restitution: CGFloat { get set }

Discussion

This property is used to determine how much energy the physics body loses when it bounces off another object. The property must be a value between

0.0
and
1.0
. The default value is
0.2
.


Good luck.

sorry just getting used to how the forum is organised.

Yes I can set a vaule above one. Intheory if you did this it would add energy to the colliding object. So a value of 2 would double energy of coliding object. Which it does... normally


Also in theory a value of one is perfect bouce and no energy lost. Wierdly not now. Only happened this week as previously I have had no issues like this

Hoping this is a bug and the update may help...