Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialmrguiman
2,658 PointsSKSpriteNode default size
Hi,
I'm following this course by writing the game with swift, and I'm a bit surprised because for some reason my spacedog_A node is not created at the correct size of the image.
Instead, the node seems to be a rectangle, and so the image looks bad.
Is there any reason why this is behaving like this ?
Thanks
2 Answers
mrguiman
2,658 PointsI'm not setting a size to the image, rather creating my node directly with "imageNamed"
agreatdaytocode
24,757 PointsHave you created an outlet for it? If so check the settings via storyboard under the view mode.
agreatdaytocode
24,757 PointsCan you post the code. or share the project. I'll take a look at it for you if you want.
mrguiman
2,658 PointsNo outlet, just declared and positioned straight from my GameScene swift file. What's surprising if that it only happens with this particular image but all of my other sprites were created at original image size
agreatdaytocode
24,757 Pointsagreatdaytocode
24,757 PointsAre you setting a size to the image via Code?