How to calculate falling speed in spritekit?

Is there a way to calculate falling speed based on physics body settings, instead of waiting it to fall and getting velocity?

I would like to find what time it takes for object to fall from defined point and hit the ground. Usually using this formula time = distance / speed, but this time speed is a problem.

• Hi! Given that a falling object has probably an acceleration (even in a simulated environment, I guess) and during the travel something could happen, I'm not quite sure SpriteKit actually knows how much it's going to take to fall to the ground. Can you give more context? Or why do you need this data? Welcome to this forum! – sabi Feb 8 at 22:58
• Hi, thanks. Game is 2D. Let's say there is an enemy which drops bombs. Player moves forward with constant speed. I would like to trigger enemy to drop bomb, so that it will hit player exactly when player is right below enemy. Maybe there is better solution, but my first idea was to do calculations based on time of bomb traveling and player approaching. – elektricni Feb 8 at 23:45
• Using your formula you could find the speed as speed = distance / time – Jay Feb 9 at 5:52
• I’d implement this particular mechanic as a triggered trap. When the player is moving forward, in the moment he pass a certain Point, the enemy drops the bomb. Then I’d go empirically to find the best Point. – sabi Feb 9 at 6:36
• Yes, that was my plan. :) Problem is finding that point, because it is based on bomb speed, and I don't know which values SpriteKit uses to calculate gravity. – elektricni Feb 9 at 10:47