I am making a game with SpriteKit's
framework. How would I make an outlined text with SKLabelNodes
? There doesn't seem to be a built in function of doing this. If there is no way to do it within SpriteKit
, what other ways could I approach this?
Asked
Active
Viewed 106 times
1

Dharmesh Kheni
- 71,228
- 33
- 160
- 165

R_C
- 333
- 2
- 6
- 17
-
https://stackoverflow.com/questions/19211827/what-would-be-the-best-approach-for-outlining-or-dropshadowing-a-font – Knight0fDragon Jan 04 '18 at 21:45
1 Answers
1
Ok, so I didn't know how to implement UILabels or NSAttributedLabelNodes onto a SpriteKit GameScene, so I just put 4 SKLabels in black behind the original SKLabel (same font size). I then adjusted the 4 black SKLabels, one going a little to the left (relative to the original label), a little to the right, a little up, a little down. This gave an outlining illusion. Pretty bootleg solution but it works. Hopefully SpriteKit implements a better built in option!
Hope this helps someone!

R_C
- 333
- 2
- 6
- 17