How do I create a Physics Body for a string of characters in SpriteKit? I don't want it to be a rectangle around the font, I want each letter to be its own shape for contact.
Asked
Active
Viewed 431 times
4
-
1It looks complicated. But first think i would try would be trying. (+ bodyWithTexture:size:) (+ bodyWithTexture:alphaThreshold:size:) You can give it a try. – Darvas Nov 28 '15 at 09:58
1 Answers
2
There is not a built in way to create an SKPhysicsBody
from a SKLabelNode
or characters in a string.
You might want to look into creating a full image set of alphabetic characters, creating an SKImageNode
for each letter in a string, and using + bodyWithTexture: size:
to assign each a body based on its texture.

cpimhoff
- 675
- 6
- 11