December 6, 2017 at 9:17 pm #177028
Looks like my previous post didn`t take so if this comes out as a duplicate, I apologize.
m really wondering how you are getting that 2D ball to fly through Z-space to clear those hoops and hit those birds in your SceneKit/ARKit demo ( https://www.youtube.com/watch?v=vREp9bHgldE ) . Ive learned how to do this in SceneKit using ARKit, but I haven`t found any tutorials on how to do this in SpriteKit using ARKit yet. Could you share the code or create a quick tutorial on how to do toss an object along the Z-axis in SpriteKit/ARKit?
m planning to use SpriteKit for my next game because I want to use forward facing 2D graphics instead of 3D, but for throwing projectiles, I dont think I can shrink the graphic while making it fall with gravity until it hits something because the ball/projectile would still appear above all of the other background graphics on different Z levels, correct?
I haven`t started coding the came yet, just planning it right now. This is connected to my previous question as well.
Love that demo. 🙂
December 7, 2017 at 2:20 pm #177046
Sure so one important thing is the physics body can’t be a donut if you’re sending a ball through something like a ring. You have to leave a small gap in it like the image above. The sprite itself can look like whatever you want though. If you want to test that the ball went through the ring, you can have a separate physics body (just a circle shape) within the ring that’s used for contact detection to score points or whatever.
The z layer really doesn’t have much to do with it because that gets ignored (mostly) once things are in the AR world. Its the zDistance from the user in augmented reality thats important.
But what I would do is launch the ball toward the targets in the normal non-AR scene, then at a certain size that ball is removed and replaced with a ball thats put into the AR world at a zDistance in back of the targets. Its what I did in my Tooniverse app and its really convincing.
December 7, 2017 at 8:08 pm #177058
Ok, I think I have a general idea of the concept now.
I didn`t know that you had already released the Tooniverse app. Just downloaded it and have been playing it this morning.
To be honest, this is the most fun, reliable and interactive AR app that I`ve played on from the App Store so far next to Stack, BB Zombies and Kings of Pool!
ve built some of the standard AR Apps (like AR drawing, 360 alien shooters, the Ikea App and a few others from the Udemy courses Im taking this week) for study in SceneKit with AR, but these are the types of games that I prefer. The plane detection and tracking required for placing 3D objects is a little too hit and miss while indoors for my tastes depending on the device being used. These games require too much space and movement for the types of games I have in mind.
I think it
s probably frustrating for users, so Id prefer to work more with SpriteKit and AR style games similar to Tooniverse until things get a bit more stable on the plane detection side. But there are very few tutorials on building actual games AR Games with SpriteKit – just yours!
Been going through your notes and blog posts to see if I can find sample code for the ball toss and layer interaction, but basically you are using a technique similar to this in the beginning and just switching the graphic & zDistance after the ball shrinks to a certain size, correct? https://www.youtube.com/watch?v=shZysLKR3cc&list=PLj5e0awpN-GgT4rpEeVvwsM-PvkWCEKoR
December 7, 2017 at 8:48 pm #177060
Ahh, well if the ball doesn’t have to actually look like its going through something (like a ring), then my original reply is a bit off topic.
If you’re just tossing the ball into a trashcan, I think you could just add the sprite straight into the AR world and make it appear like its being tossed forward by shrinking it adding gravity.
Thanks for the comments on the game. Be nice if Apple’s editors took notice too =)
December 7, 2017 at 9:20 pm #177061
Good timing. I just left a review of your game about 5 minutes ago.
No, you were correct. My projectiles (ninja stars) will need to go through hoops and objects to hit their targets so the obstacles will be a major factor.
m actually very surprised I havent seen this game featured anywhere on the Top 10 AR Kit games lists anywhere ( I was looking for it ) because your video demo was what made me want to study in-depth AR in the first place and the video has been out for awhile… I just thought you hadn
t released the game yet for some reason and were waiting until your AR Master Course was completed or something so thats why it wasn
t on any of the lists... Hahahaha! But most people arent teaching SpriteKit with ARKit for some reason.
Was pretty shocked to see that it hasn
t gained so much activity or reviews on the store yet. Maybe theyre only considering SceneKit 3D based AR games?
But to be honest, I
m not really too impressed with most of the 3D games that Ive seen and am learning to build so far. I think SceneKit and 3D is good for some apps, like Stack, Educational apps and the Ikea app that won`t require so much movement, but for high-speed interactive and fun games… Hmmm probably need to wait awhile on those until the plane detection & lighting technology can be improved…
I bought 3 AR courses though, so I should be a SceneKit professional by the end of this month though, even though they don
t cover SpriteKit with ARKit much - which is what Im really interested in.
You must be logged in to reply to this topic.