How can I make the light stop shining basically though the wall? I know that it’s because the SKLightNode is illuminating the background and this background is one single node, but how can I prevent it?
Defining Physicsd in Scene Builder
In the tutorial the settings for “Allows Rotation”, “Affected By Gravity” etc are all set in the Physics Definition section of the Attribute Inspector
http://www.raywenderlich.com /wp-content/uploads/2015/10/SKSE-image9.png (sry, i can only put 1 image in the post)
sadly, my Attribute Inspector looks rather different and my Physics Definition section lacks everything except the Body Type dropdown:
how do i get my Attributes Inspector to look like the one in the tutorial?
I just checked and you’re right – it looks like Apple changed the displayed options for the Alpha mask body type. If you pick one of the other two body types it still works, though :]
ok, great, i’ll try it right away
also: thank you for the quick reply
Hi, thanks for a nice tutorial! I join the ioswarrior question, how to avoid light shine through the walls?
And I have an additional problem: after you lose or win level, music won’t play again. How I’m able to fix it?
upd: Music muted because of transition. If you run music when transition is finished, everything will be okay.
How do I get my player and walls to collide correctly? Both have physics applied to them but they arent interacting at all. My player and zombies can all move through walls
to all who want to try this in Xcode 8 with Swift 3
here is a working starter version of the code
and here is a working final version of the code
do note, i am NOT a team member
all credit goes to the team member who made the original tutorial
i only updated the code to Swift 3.0 for myself and now I’m sharing it with you guys
Thanks a bunch for sharing this, @kvebeeck :] !
you are welcome
i believe in sharing work
The reason the options aren’t displayed for alpha mask, is because you need to set a texture before setting the alpha mask. Once the texture is set, the options will be displayed.
i get everytime this error:
validateIndexBuffer:130: failed assertion `indexBufferOffset(12) + (indexCount(702) * 2) must be <= indexBuffer length.’
This cames after i implemented the “Light Node” and Lightning: Light Mask, Shadow Cast Mask and Shadowed Mask.
When i disable the “Metal API Validation”, then the App is hanging on. Sometimes i get a GPU hang on warning.
Can anyone help me? What i do wrong?
Thanks in advance!
Thanks very much! this is my first project in Swift/Spritekit and I loved it! I’ll keep watching your tutorials to learn more
I am getting the same problem just with slightly different numbers. Has anybody managed to solve this issue yet, or know what to do? For me, this happened when i was nearing the end of the level & the character was not in contact with anything at the time.
validateIndexBuffer:130: failed assertion `indexBufferOffset(12) + (indexCount(480) * 2) must be <= [indexBuffer length] (960.
This tutorial is more than six months old, so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]