Any way to simulate the motion of a 3D ball in a 2D game using SpriteKit?

I am wondering if anyone knows about a way to simulate a ball, such as moving in 3D in SpriteKit (2D wireframe). For example, if a soccer ball rolls, or a retracted ball for a pool, or even baseball with red bumps. I think that 2D processing of this kind of thing makes it look like it is moving along an ice sheet instead of realistic rolling behavior. This works for objects such as a hockey puck, but not for a realistic ball roll. Any thoughts on this would be wonderful. I played games that make it work, and the developers claim to use a 2d engine. The last thing I remember is a game in the Miniclips Pool. They claim to have used Cocos, and this is a 2D game, if I remember correctly from the article I read.

+4
source share
1 answer

You can use a 3D animation package such as (Maya, 3DSMax, modo, Cinema4D, etc.) and animate the swing of the ball (plan or lateral height depending on your type). Also, depending on your ball template, you can keep the frame count pretty low, maybe 15 frames. Then you will create frames as a series of PNG files Ball_0001@2x.png, Ball_0002@2x.png, Ball_0003@2x.png, put them in an atlas and assign them to SKSpriteNode with SKAction. In the sprite set, you can make several changes to change the animation, simplify, simplify by SKActionschanging the frame time toSKAction / . , , . , , .

EDIT:

, , , . , , ( ), , 120 . , 120 ( 15 ), 3 , 360deg roll (45 ), 15. , , , , SKActions.

enter image description here

+4

Source: https://habr.com/ru/post/1528844/


All Articles