Physical body for SKLabelNode in SpriteKit?

How to create a physical organ for a character string in SpriteKit? I do not want this to be a rectangle around the font, I want each letter to be its own contact form.

+4
source share
1 answer

There is no built-in way to create SKPhysicsBodyfrom SKLabelNodeor characters in a string.

You may need to create a complete set of alphabetic characters by creating SKImageNodefor each letter in a string and using + bodyWithTexture: size:to assign each body based on its texture.

+2
source

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


All Articles